/*!
 * Kigetss Academy — design layer for Kadence + Elementor (Stages 1–3).
 * Reference: kigetss-redesign/dist (prototype).
 *
 * Sections
 *  1. Tokens
 *  2. Kadence / Elementor variable bridge
 *  3. Base
 *  4. Header
 *  5. Navigation (desktop dropdowns + mobile panel)
 *  6. Footer
 *  7. Shared components (kg-button)
 *  8. Content typography (Elementor text-editor, entry-content)
 *  9. Elementor widgets (buttons, video, image, accordion, image-box, divider, counter, heading)
 * 10. Tables (generic + TablePress)
 * 11. Layout: single post, pages, sidebar, archives
 * 12. Templates: page header, cards, pagination, single post, TablePress on phones
 * 13. Landing sections for Elementor pages (home, catalog, contacts, about, course pages)
 * 14. Motion & print
 *
 * Specificity notes: content was authored with inline styles and per-post
 * Elementor CSS (`.elementor-<id> .elementor-element.elementor-element-<hash> …`,
 * specificity 0,4,0). Heading colours and buttons therefore use !important;
 * everything else relies on load order (this file loads after Kadence and Elementor).
 */

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
	--kg-navy: #172838;
	--kg-navy-deep: #11202e;
	--kg-navy-hover: #2b4357;
	--kg-cream: #f7f5f0;
	--kg-paper: #eeece6;
	--kg-card: #fffdf8;
	--kg-ink: #202a33;
	--kg-text: #33404a;          /* long-form body text (AA on cream & card) */
	--kg-muted: #697179;         /* 4.5:1 on cream */
	--kg-copper: #b97c60;        /* decorative only (rules, markers, focus) */
	--kg-copper-text: #8d5a42;   /* copper for text/links: 5.6:1 on card */
	--kg-accent: #995c42;        /* accent buttons, white text 5.1:1 */
	--kg-accent-hover: #7d4a34;
	--kg-line: #d9d9d2;
	--kg-card-line: #e5e4dd;

	--kg-font-heading: "Manrope", Arial, sans-serif;
	--kg-font-body: "Manrope", Arial, sans-serif;
	--kg-font-mark: "Manrope", Arial, sans-serif; /* one typeface across the site (owner, 2026-10-26) */
	--kg-font-display: "Manrope", Arial, sans-serif; /* hero and section display headings */

	--kg-text-size: 18px;
	--kg-measure: 46rem;
	--kg-radius: 12px;
	--kg-radius-sm: 8px;
	--kg-shadow-soft: 0 8px 28px rgba(23, 40, 56, .04);
	--kg-shadow-lift: 0 18px 40px rgba(23, 40, 56, .08);
	--kg-ease: cubic-bezier(.2, .7, .25, 1);
	--kg-shell: 1290px;
	--kg-gutter: 1.5rem;
	--kg-header-h: 76px; /* updated by JS */
}

@media (max-width: 767px) {
	:root {
		--kg-text-size: 17px;
		--kg-gutter: 1rem;
	}
}

/* ==========================================================================
   2. Kadence / Elementor variable bridge
   (Customizer values stay untouched; we re-point the variables they produce.)
   ========================================================================== */
:root:root {
	--global-palette1: var(--kg-copper-text);   /* links / accents */
	--global-palette2: var(--kg-navy);          /* link hover */
	--global-palette3: var(--kg-navy);          /* headings */
	--global-palette4: var(--kg-ink);           /* body text */
	--global-palette5: #4b555e;
	--global-palette6: var(--kg-muted);
	--global-palette7: var(--kg-paper);
	--global-palette8: var(--kg-cream);         /* page background */
	--global-palette9: var(--kg-card);          /* content boxes */
	--global-palette9rgb: 255, 253, 248;
	--global-palette-highlight: var(--kg-copper-text);
	--global-palette-highlight-alt: var(--kg-navy);
	--global-palette-btn-bg: var(--kg-navy);
	--global-palette-btn-bg-hover: var(--kg-navy-hover);
	--global-palette-btn: #fff;
	--global-palette-btn-hover: #fff;
	--global-palette-btn-sec-bg: var(--kg-paper);
	--global-palette-btn-sec-bg-hover: var(--kg-navy);
	--global-palette-btn-sec: var(--kg-navy);
	--global-palette-btn-sec-hover: #fff;
	--global-body-font-family: var(--kg-font-body);
	--global-heading-font-family: var(--kg-font-heading);
	--global-primary-nav-font-family: var(--kg-font-body);
}

/* Elementor kit 5283 globals (content never references them directly, but
   widget defaults do: text-editor colour/font, button background, headings). */
body[class*="elementor-kit-"] {
	--e-global-color-primary: var(--kg-navy);
	--e-global-color-secondary: var(--kg-navy);
	--e-global-color-text: var(--kg-text);
	--e-global-color-accent: var(--kg-navy);
	--e-global-typography-primary-font-family: "Manrope";
	--e-global-typography-primary-font-weight: 700;
	--e-global-typography-secondary-font-family: "Manrope";
	--e-global-typography-secondary-font-weight: 600;
	--e-global-typography-text-font-family: "Manrope";
	--e-global-typography-text-font-weight: 400;
	--e-global-typography-accent-font-family: "Manrope";
	--e-global-typography-accent-font-weight: 700;
	font-size: var(--kg-text-size);
}

/* ==========================================================================
   3. Base
   ========================================================================== */
html {
	scroll-padding-top: calc(var(--kg-header-h) + 12px);
}

body.kg-theme {
	background: var(--kg-cream);
	color: var(--kg-ink);
	font-family: var(--kg-font-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-wrap: break-word;
}

body.kg-theme #wrapper {
	/* clip (not hidden) keeps position: sticky working on the header */
	overflow-x: clip;
	overflow-y: visible;
}

::selection {
	background: #dfbaa3;
	color: var(--kg-navy);
}

/* Zero-specificity defaults; components override freely. */
:where(body.kg-theme) a {
	color: var(--kg-copper-text);
	text-underline-offset: .18em;
	text-decoration-thickness: 1px;
}

:where(body.kg-theme) a:hover {
	color: var(--kg-navy);
}

body.kg-theme :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--kg-copper);
	outline-offset: 3px;
	box-shadow: none;
}

.kg-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.kg-skip-link {
	position: absolute;
	left: 12px;
	top: -100px;
	z-index: 1000;
	padding: 12px 18px;
	background: #fff;
	color: var(--kg-navy) !important;
	font: 700 14px/1.2 var(--kg-font-body);
	border-radius: var(--kg-radius-sm);
	box-shadow: var(--kg-shadow-lift);
	text-decoration: none;
}

.kg-skip-link:focus {
	top: 12px;
}

#inner-wrap:focus {
	outline: none;
}

.kg-shell {
	width: 100%;
	max-width: var(--kg-shell);
	margin-inline: auto;
	padding-inline: var(--kg-gutter);
	box-sizing: border-box;
}

/* ==========================================================================
   4. Header
   ========================================================================== */
.kg-header {
	position: sticky;
	top: 0;
	z-index: 50;
	isolation: isolate;
	border-bottom: 1px solid #e4e3dc;
	transition: box-shadow .25s, border-color .25s;
}

/* Blur lives on a pseudo-element: backdrop-filter on the header itself would
   become the containing block of the fixed mobile panel. */
.kg-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(247, 245, 240, .95);
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
}

.kg-header.is-scrolled {
	box-shadow: 0 5px 25px rgba(23, 40, 56, .05);
	border-bottom-color: rgba(217, 217, 210, .6);
}

.admin-bar .kg-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .kg-header {
		top: 46px;
	}
}

@media (max-width: 600px) {
	.admin-bar .kg-header {
		top: 0;
	}
}

.kg-header__inner {
	position: relative;
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 76px;
}

/* Brand ------------------------------------------------------------------- */
.kg-brand {
	display: inline-flex;
	align-items: center;
	gap: 11px;
	flex: none;
	color: var(--kg-navy) !important;
	text-decoration: none !important;
}

.kg-brand__mark {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding-right: 6px;
	box-sizing: border-box;
	background: var(--kg-navy);
	color: #fff;
	border-radius: 5px;
	box-shadow: 0 3px 8px rgba(23, 40, 56, .07);
	font: italic 30px/1 Georgia, "Times New Roman", serif; /* the logo mark keeps its serif */
	letter-spacing: -4px;
	transition: background .25s;
}

.kg-brand__mark span {
	color: var(--kg-copper);
}

.kg-brand:hover .kg-brand__mark {
	background: #345067;
}

.kg-brand__name {
	font-family: var(--kg-font-heading);
	font-size: 17px;
	font-weight: 800;
	letter-spacing: .095em;
	line-height: 1.05;
	white-space: nowrap;
}

.kg-brand__name small {
	display: block;
	margin-top: 4px;
	font-size: 9px;
	font-weight: 600;
	letter-spacing: .34em;
}

/* Actions ----------------------------------------------------------------- */
.kg-header__actions {
	display: flex;
	align-items: center;
	gap: 14px;
	flex: none;
	margin-left: auto;
}

.kg-header__login {
	color: var(--kg-navy) !important;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none !important;
	padding: 10px 4px;
}

.kg-header__cta {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	padding: 13px 18px;
	border-radius: 6px;
	background: var(--kg-navy);
	color: #fff !important;
	font: 700 13px/1.2 var(--kg-font-body);
	white-space: nowrap;
	text-decoration: none !important;
	transition: background .2s, box-shadow .2s, transform .2s;
}

.kg-header__cta:hover {
	background: var(--kg-navy-hover);
	box-shadow: 0 5px 15px rgba(23, 40, 56, .1);
	color: #fff !important;
}

.kg-header__cta:active {
	transform: scale(.98);
}

.kg-header__cta-arrow {
	color: #d3a084;
	font-size: 15px;
	font-weight: 400;
}

.kg-header__cta-short {
	display: none;
}

/* Hamburger --------------------------------------------------------------- */
.kg-menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	width: 44px;
	height: 44px;
	margin-right: -10px;
	padding: 12px;
	border: 0;
	border-radius: 6px;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--kg-navy);
	cursor: pointer;
}

.kg-menu-toggle span {
	display: block;
	width: 20px;
	height: 2px;
	background: var(--kg-navy);
	border-radius: 1px;
	transition: transform .2s, opacity .2s;
}

.kg-menu-toggle[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}

.kg-menu-toggle[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.kg-menu-toggle[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

/* ==========================================================================
   5. Navigation
   ========================================================================== */
.kg-nav__list,
.kg-nav__sub {
	list-style: none;
	margin: 0;
	padding: 0;
}

.kg-nav a {
	text-decoration: none;
}

.kg-nav__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent !important;
	box-shadow: none !important;
	color: inherit !important;
	cursor: pointer;
}

.kg-chevron {
	transition: transform .2s var(--kg-ease);
}

.kg-has-sub.is-open > .kg-nav__toggle .kg-chevron {
	transform: rotate(180deg);
}

/* Desktop ----------------------------------------------------------------- */
@media (min-width: 1200px) {
	.kg-nav {
		align-self: stretch;
		display: flex;
		margin-left: auto;
	}

	.kg-nav__list {
		display: flex;
		align-items: stretch;
		gap: 2px;
	}

	.kg-nav__extra {
		display: none;
	}

	/* The brand already links home. */
	.kg-nav__list > .menu-item-home {
		display: none;
	}

	.kg-nav__item--d0 {
		position: relative;
		display: flex;
		align-items: center;
	}

	.kg-nav__item--d0 > a {
		position: relative;
		display: block;
		padding: 10px 6px;
		color: #46515a;
		font-size: 13.5px;
		font-weight: 700;
		white-space: nowrap;
		transition: color .2s;
	}

	.kg-nav__item--d0 > a::after {
		content: "";
		position: absolute;
		left: 6px;
		right: 6px;
		bottom: 4px;
		height: 2px;
		background: var(--kg-copper);
		transform: scaleX(0);
		transform-origin: left;
		transition: transform .25s var(--kg-ease);
	}

	.kg-nav__item--d0 > a:hover,
	.kg-nav__item--d0.is-open > a,
	.kg-nav__item--d0:is(.current-menu-item, .current-menu-ancestor) > a {
		color: var(--kg-navy);
	}

	.kg-nav__item--d0 > a:hover::after,
	.kg-nav__item--d0:is(.current-menu-item, .current-menu-ancestor) > a::after {
		transform: scaleX(1);
	}

	.kg-nav__item--d0 > .kg-nav__toggle {
		width: 22px;
		height: 30px;
		margin-left: -4px;
		margin-right: 4px;
		color: #7a858d !important;
	}

	.kg-nav__item--d0 > .kg-nav__toggle:hover {
		color: var(--kg-navy) !important;
	}

	/* Panels */
	.kg-nav__sub--d1 {
		display: none;
		position: absolute;
		top: 100%;
		left: -8px;
		z-index: 60;
		min-width: 280px;
		max-width: 360px;
		padding: 10px;
		background: var(--kg-card);
		border: 1px solid var(--kg-card-line);
		border-radius: var(--kg-radius);
		box-shadow: var(--kg-shadow-lift);
	}

	.kg-flip > .kg-nav__sub--d1 {
		left: auto;
		right: -8px;
	}

	.kg-nav__item--d0.is-open > .kg-nav__sub--d1 {
		display: block;
		animation: kg-drop .18s var(--kg-ease);
	}

	/* No-JS fallback */
	html:not(.kg-js) .kg-nav__item--d0:is(:hover, :focus-within) > .kg-nav__sub--d1 {
		display: block;
	}

	.kg-nav__sub a {
		display: block;
		padding: 8px 12px;
		border-radius: 6px;
		color: var(--kg-ink);
		font-size: 14px;
		font-weight: 600;
		line-height: 1.35;
		transition: background .15s, color .15s;
	}

	.kg-nav__sub a:hover,
	.kg-nav__sub .current-menu-item > a {
		background: var(--kg-paper);
		color: var(--kg-navy);
	}

	.kg-nav__sub .current-menu-item > a {
		box-shadow: inset 2px 0 var(--kg-copper);
	}

	/* Second-level toggles are not needed on desktop: level 3 is always visible. */
	.kg-nav__sub .kg-nav__toggle {
		display: none;
	}

	.kg-nav__sub--d2 {
		margin: 0 0 6px 12px;
		padding-left: 8px;
		border-left: 1px solid var(--kg-line);
	}

	.kg-nav__sub--d2 a {
		padding: 6px 10px;
		color: #4b555e;
		font-size: 13px;
		font-weight: 500;
	}

	/* Mega panel (items with a third level, e.g. "Starters") */
	.kg-has-mega {
		position: static;
	}

	.kg-has-mega > .kg-nav__sub--d1,
	.kg-flip.kg-has-mega > .kg-nav__sub--d1 {
		left: 50%;
		right: auto;
		width: min(900px, calc(100vw - 48px));
		max-width: none;
		padding: 18px 16px;
		column-count: 3;
		column-gap: 20px;
		transform: translateX(-50%);
		max-height: calc(100vh - var(--kg-header-h) - 24px);
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	.kg-has-mega > .kg-nav__sub--d1 > li {
		break-inside: avoid;
	}

	.kg-has-mega > .kg-nav__sub--d1 > .kg-has-sub > a {
		color: var(--kg-navy);
		font-weight: 700;
	}

	.kg-nav-backdrop {
		display: none !important;
	}
}

@media (min-width: 1200px) and (max-width: 1320px) {
	.kg-header__inner {
		gap: 12px;
	}

	.kg-nav__item--d0 > a {
		padding-inline: 5px;
		font-size: 13px;
	}

	.kg-nav__item--d0 > .kg-nav__toggle {
		margin-right: 2px;
	}

	.kg-header__cta {
		gap: 8px;
		padding-inline: 14px;
	}
}

@keyframes kg-drop {
	from {
		opacity: 0;
		translate: 0 -4px;
	}

	to {
		opacity: 1;
		translate: 0 0;
	}
}

/* Mobile panel ------------------------------------------------------------ */
@media (max-width: 1199.98px) {
	.kg-header__inner {
		min-height: 68px;
		gap: 12px;
	}

	.kg-menu-toggle {
		display: inline-flex;
	}

	.kg-nav {
		position: fixed;
		top: var(--kg-header-h);
		right: 0;
		bottom: 0;
		z-index: 45;
		width: min(440px, 100%);
		box-sizing: border-box;
		padding: 8px 22px 40px;
		overflow-y: auto;
		overscroll-behavior: contain;
		background: var(--kg-cream);
		border-left: 1px solid var(--kg-line);
		box-shadow: -18px 0 40px rgba(23, 40, 56, .08);
		visibility: hidden;
		transform: translateX(100%);
		transition: transform .28s var(--kg-ease), visibility 0s linear .28s;
	}

	.kg-nav.is-open {
		visibility: visible;
		transform: none;
		transition: transform .28s var(--kg-ease), visibility 0s;
	}

	/* Without JS the menu simply sits under the header. */
	html:not(.kg-js) .kg-nav {
		position: static;
		width: 100%;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: 0;
		order: 10;
	}

	html:not(.kg-js) .kg-header__inner {
		flex-wrap: wrap;
	}

	html.kg-menu-open,
	html.kg-menu-open body {
		overflow: hidden;
	}

	/* Floating chat button (Chaty) would cover the panel. */
	html.kg-menu-open .chaty {
		visibility: hidden;
	}

	.kg-nav-backdrop {
		position: fixed;
		inset: var(--kg-header-h) 0 0 0;
		z-index: 40;
		background: rgba(17, 32, 46, .42);
	}

	.kg-nav-backdrop[hidden] {
		display: none;
	}

	.kg-nav__item {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
	}

	.kg-nav__item > a {
		flex: 1 1 0;
		min-width: 0;
		display: block;
	}

	.kg-nav__item > .kg-nav__toggle {
		width: 44px;
		height: 44px;
		color: var(--kg-muted) !important;
	}

	.kg-nav__item > .kg-nav__sub {
		flex-basis: 100%;
		display: none;
	}

	.kg-nav__item.is-open > .kg-nav__sub {
		display: block;
	}

	html:not(.kg-js) .kg-nav__item:focus-within > .kg-nav__sub {
		display: block;
	}

	.kg-nav__item--d0 {
		border-bottom: 1px solid var(--kg-line);
	}

	.kg-nav__item--d0 > a {
		padding: 14px 4px;
		color: var(--kg-navy);
		font: 700 17px/1.3 var(--kg-font-heading);
	}

	.kg-nav__sub--d1 {
		padding: 0 0 12px 10px;
		border-left: 2px solid var(--kg-paper);
		margin-left: 4px;
	}

	.kg-nav__sub a {
		padding: 10px 6px;
		color: var(--kg-ink);
		font-size: 15.5px;
		font-weight: 500;
		line-height: 1.35;
	}

	.kg-nav__sub--d2 {
		padding: 0 0 8px 12px;
	}

	.kg-nav__sub--d2 a {
		font-size: 14.5px;
		color: #4b555e;
	}

	.kg-nav .current-menu-item > a {
		color: var(--kg-copper-text);
	}

	.kg-nav__extra {
		display: grid;
		gap: 10px;
		margin-top: 24px;
	}
}

/* Small phones: compact CTA, keep its accessible name. */
@media (max-width: 479.98px) {
	.kg-header__inner {
		gap: 8px;
	}

	.kg-brand {
		gap: 9px;
	}

	.kg-brand__mark {
		width: 35px;
		height: 35px;
		font-size: 27px;
	}

	.kg-brand__name {
		font-size: 14px;
	}

	.kg-brand__name small {
		font-size: 8px;
	}

	.kg-header__actions {
		gap: 6px;
	}

	.kg-header__cta {
		padding: 11px 12px;
		gap: 6px;
		font-size: 12px;
	}

	.kg-header__cta-long {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.kg-header__cta-short {
		display: inline;
	}

	.kg-header__login {
		display: none;
	}
}

@media (max-width: 359.98px) {
	.kg-header__cta-arrow {
		display: none;
	}
}

/* ==========================================================================
   6. Footer
   ========================================================================== */
.kg-footer {
	margin-top: 0;
	background: var(--kg-cream);
	border-top: 1px solid #dfe0d8;
	color: var(--kg-ink);
}

.kg-footer a {
	color: var(--kg-navy);
	text-decoration: none;
}

.kg-footer a:hover {
	color: var(--kg-copper-text);
	text-decoration: underline;
}

.kg-footer__top {
	display: grid;
	grid-template-columns: 1.2fr 1fr .9fr;
	gap: 48px;
	padding-block: 56px 48px;
}

.kg-footer__tagline {
	margin: 18px 0 22px;
	max-width: 300px;
	color: var(--kg-navy);
	font: 600 22px/1.3 var(--kg-font-heading);
	letter-spacing: -.02em;
}

.kg-footer .kg-footer__title {
	margin: 4px 0 16px;
	color: var(--kg-copper-text);
	font: 800 11px/1.4 var(--kg-font-heading);
	letter-spacing: .18em;
	text-transform: uppercase;
}

.kg-footer__links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	font-weight: 700;
}

/* The brand links home; skip a duplicate "Home" entry. */
.kg-footer__links > .menu-item-home {
	display: none;
}

.kg-footer__contacts {
	margin: 0;
}

.kg-footer__contacts > div {
	padding: 12px 0;
	border-top: 1px solid var(--kg-line);
}

.kg-footer__contacts > div:first-child {
	border-top: 0;
	padding-top: 0;
}

.kg-footer__contacts dt {
	margin-bottom: 4px;
	color: var(--kg-muted);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.kg-footer__contacts dd {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.kg-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	padding-block: 20px 28px;
	border-top: 1px solid var(--kg-line);
	color: var(--kg-muted);
	font-size: 13px;
}

.kg-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.kg-footer__legal a {
	color: var(--kg-muted);
}

@media (max-width: 1024px) {
	.kg-footer__top {
		grid-template-columns: 1fr 1fr;
	}

	.kg-footer__brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 600px) {
	.kg-footer__top {
		grid-template-columns: 1fr;
		gap: 32px;
		padding-block: 44px 36px;
	}

	.kg-footer__bottom {
		flex-direction: column;
		align-items: flex-start;
		padding-bottom: 96px; /* room for the floating chat button */
	}
}

/* ==========================================================================
   7. Shared components
   ========================================================================== */
.kg-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-height: 50px;
	padding: 14px 20px;
	box-sizing: border-box;
	border: 1px solid transparent;
	border-radius: var(--kg-radius-sm);
	font: 700 14px/1.3 var(--kg-font-body);
	text-align: center;
	text-decoration: none !important;
	transition: transform .22s var(--kg-ease), background .22s, box-shadow .22s, color .2s;
}

.kg-button:hover {
	transform: translateY(-2px);
	text-decoration: none !important;
}

.kg-button--primary {
	background: var(--kg-navy);
	color: #fff !important;
}

.kg-button--primary:hover {
	background: var(--kg-navy-hover);
	box-shadow: 0 7px 18px rgba(23, 40, 56, .1);
}

.kg-button--accent {
	background: var(--kg-accent);
	color: #fff !important;
}

.kg-button--accent:hover {
	background: var(--kg-accent-hover);
	box-shadow: 0 7px 18px rgba(125, 74, 52, .18);
}

.kg-button--ghost {
	border-color: var(--kg-line);
	color: var(--kg-navy) !important;
	background: transparent;
}

/* ==========================================================================
   8. Content typography
   Applies to Elementor text-editor widgets (82% of all content, headings are
   inline HTML there) and to plain entry content.
   ========================================================================== */
body .elementor-widget-text-editor,
body .entry-content:not(:has(.elementor)) {
	color: var(--kg-text);
	font-family: var(--kg-font-body);
	font-size: var(--kg-text-size);
	line-height: 1.75;
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) :is(h1, h2, h3, h4, h5, h6) {
	font-family: var(--kg-font-heading);
	color: var(--kg-navy) !important;
	font-weight: 700;
	text-wrap: balance;
}

/* Inline spans inside headings (colour, size, font) follow the heading. */
body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) :is(h1, h2, h3, h4, h5, h6) :is(span, strong, b, em, i, font, u) {
	color: inherit !important;
	font-size: inherit !important;
	font-family: inherit !important;
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) h1 {
	margin: 0 0 .45em;
	font-size: clamp(30px, 1.6vw + 22px, 44px);
	font-weight: 800;
	line-height: 1.14;
	letter-spacing: -.025em;
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) h2 {
	margin: 1.5em 0 .55em;
	font-size: clamp(24px, .8vw + 19px, 31px);
	line-height: 1.2;
	letter-spacing: -.02em;
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) h3 {
	margin: 1.35em 0 .5em;
	font-size: clamp(20px, .4vw + 17px, 23px);
	line-height: 1.3;
	letter-spacing: -.012em;
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) :is(h4, h5, h6) {
	margin: 1.2em 0 .45em;
	font-size: 18px;
	line-height: 1.4;
}

body .elementor-widget-text-editor :is(h1, h2, h3, h4, h5, h6):first-child {
	margin-top: 0;
}

/* Orange headings (#ff6600, ~640) keep their emphasis in the copper accent;
   grey ones (#808080, ~600, usually subtitles) become muted. */
body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) :is(h1, h2, h3, h4):is([style*="#ff6600" i], :has([style*="#ff6600" i])) {
	color: var(--kg-copper-text) !important;
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) :is(h1, h2, h3, h4):is([style*="#808080" i], :has([style*="#808080" i])) {
	color: var(--kg-muted) !important;
	font-weight: 600;
}

/* Links inside headings stay recognisable. */
body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) :is(h1, h2, h3, h4, h5, h6) a {
	color: var(--kg-copper-text) !important;
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) p {
	margin: 0 0 1.1em;
}

body .elementor-widget-text-editor > .elementor-widget-container > :last-child,
body .elementor-widget-text-editor p:last-child {
	margin-bottom: 0;
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) :is(strong, b) {
	color: var(--kg-ink);
	font-weight: 700;
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) a:not(.elementor-button) {
	color: var(--kg-copper-text);
	text-decoration: underline;
	text-decoration-color: rgba(141, 90, 66, .45);
	text-underline-offset: .2em;
	transition: color .15s, text-decoration-color .15s;
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) a:not(.elementor-button):hover {
	color: var(--kg-navy);
	text-decoration-color: currentColor;
}

/* Off-palette inline text colours with poor contrast, mapped to the palette
   while keeping their meaning (emphasis / secondary text). Everything else
   inline (teal, red, green…) is left as authored. */
body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) [style*="color: #000000" i]:not([style*="background" i]) {
	color: var(--kg-ink) !important;
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) [style*="color: #ff6600" i]:not([style*="background" i]) {
	color: var(--kg-copper-text) !important;
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) [style*="color: #808080" i]:not([style*="background" i]) {
	color: var(--kg-muted) !important;
}

/* Lists */
body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) :is(ul, ol) {
	margin: 0 0 1.1em;
	padding-left: 1.4em;
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) li {
	margin: 0 0 .4em;
	padding-left: .2em;
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) li::marker {
	color: var(--kg-copper);
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) ol > li::marker {
	color: var(--kg-copper-text);
	font-weight: 700;
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) :is(ul, ol) :is(ul, ol) {
	margin: .4em 0 .2em;
}

/* Blockquote */
body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) blockquote {
	margin: 1.6em 0;
	padding: 18px 24px;
	border-left: 3px solid var(--kg-copper);
	border-radius: 0 var(--kg-radius) var(--kg-radius) 0;
	background: var(--kg-paper);
	color: var(--kg-ink);
	font-size: 1.04em;
	font-style: normal;
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) blockquote > :last-child {
	margin-bottom: 0;
}

/* Media inside text */
body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) img {
	max-width: 100%;
	height: auto;
	border-radius: var(--kg-radius-sm);
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) iframe {
	max-width: 100%;
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) hr {
	margin: 2em 0;
	border: 0;
	border-top: 1px solid var(--kg-line);
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) :is(code, kbd) {
	padding: .1em .35em;
	border-radius: 4px;
	background: var(--kg-paper);
	font-size: .9em;
}

/* ==========================================================================
   9. Elementor widgets
   ========================================================================== */

/* Buttons ------------------------------------------------------------------
   All buttons become the prototype button. Two variants:
   - primary (navy): the teal #2AA19E preset and everything else;
   - accent (copper): gradient CTA preset (.kg-btn-accent, set in PHP) and any
     button linking to /contacts… (booking page; covers cached renders).
   ------------------------------------------------------------------------ */
body .elementor-widget-button .elementor-button,
body .elementor-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	min-height: 50px;
	padding: 14px 22px !important;
	box-sizing: border-box;
	border: 1px solid transparent !important;
	border-radius: var(--kg-radius-sm) !important;
	background: var(--kg-navy) !important;
	background-image: none !important;
	color: #fff !important;
	fill: #fff !important;
	font-family: var(--kg-font-body) !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	font-style: normal !important;
	line-height: 1.35 !important;
	letter-spacing: .005em !important;
	text-transform: none !important;
	text-decoration: none !important;
	text-shadow: none !important;
	text-align: center;
	white-space: normal;
	box-shadow: none !important;
	transition: transform .22s var(--kg-ease), background-color .22s, box-shadow .22s;
}

body .elementor-widget-button .elementor-button:is(:hover, :focus-visible),
body .elementor-button:is(:hover, :focus-visible) {
	background: var(--kg-navy-hover) !important;
	background-image: none !important;
	color: #fff !important;
	fill: #fff !important;
	border-color: transparent !important;
	box-shadow: 0 7px 18px rgba(23, 40, 56, .12) !important;
	transform: translateY(-2px);
}

body .elementor-widget-button .elementor-button:active {
	transform: translateY(0) scale(.98);
}

body .elementor-widget-button.kg-btn-accent .elementor-button,
body .elementor-widget-button .elementor-button[href*="/contacts"] {
	background: var(--kg-accent) !important;
}

body .elementor-widget-button.kg-btn-accent .elementor-button:is(:hover, :focus-visible),
body .elementor-widget-button .elementor-button[href*="/contacts"]:is(:hover, :focus-visible) {
	background: var(--kg-accent-hover) !important;
	box-shadow: 0 7px 18px rgba(125, 74, 52, .2) !important;
}

body .elementor-button .elementor-button-content-wrapper {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

body .elementor-button .elementor-button-text {
	color: inherit !important;
}

body .elementor-button .elementor-button-icon {
	display: inline-flex;
	color: inherit !important;
	font-size: 1em !important;
}

body .elementor-button .elementor-button-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor !important;
}

/* Prototype arrow, unless the button already has an icon. */
body .elementor-button .elementor-button-content-wrapper::after {
	content: "↗";
	flex: none;
	font-weight: 400;
	font-size: 1.15em;
	line-height: 1;
	opacity: .85;
}

body .elementor-button .elementor-button-content-wrapper:has(.elementor-button-icon)::after {
	content: none;
}

/* Video -------------------------------------------------------------------- */
body .elementor-widget-video .elementor-wrapper,
body .elementor-widget-video .elementor-video {
	overflow: hidden;
	border-radius: var(--kg-radius);
}

body .elementor-widget-video .elementor-wrapper {
	background: var(--kg-navy-deep);
	box-shadow: var(--kg-shadow-soft);
}

body .entry-content :is(iframe[src*="youtube"], iframe[src*="vimeo"]) {
	border-radius: var(--kg-radius);
}

/* Image -------------------------------------------------------------------- */
body .elementor-widget-image img {
	border-radius: var(--kg-radius-sm);
}

body .elementor-widget-image .widget-image-caption,
body .wp-caption-text {
	margin-top: 8px;
	color: var(--kg-muted);
	font-size: 14px;
	line-height: 1.5;
}

/* Accordion (legacy widget) ------------------------------------------------- */
body .elementor-accordion .elementor-accordion-item {
	border: 0 !important;
	border-top: 1px solid var(--kg-line) !important;
}

body .elementor-accordion .elementor-accordion-item:last-child {
	border-bottom: 1px solid var(--kg-line) !important;
}

body .elementor-accordion .elementor-tab-title {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px 2px !important;
	border: 0 !important;
	background: transparent !important;
	color: var(--kg-navy) !important;
	font: 700 17px/1.4 var(--kg-font-heading) !important;
}

body .elementor-accordion .elementor-tab-title a,
body .elementor-accordion .elementor-tab-title .elementor-accordion-title {
	color: inherit !important;
	font: inherit !important;
	text-decoration: none !important;
}

body .elementor-accordion .elementor-tab-title.elementor-active {
	color: var(--kg-copper-text) !important;
}

body .elementor-accordion .elementor-accordion-icon {
	order: 2;
	margin-left: auto;
	color: var(--kg-copper) !important;
	fill: var(--kg-copper) !important;
}

body .elementor-accordion .elementor-accordion-icon svg {
	fill: currentColor !important;
}

body .elementor-accordion .elementor-tab-content {
	padding: 0 2px 20px !important;
	border: 0 !important;
	background: transparent !important;
	color: var(--kg-text) !important;
	font-family: var(--kg-font-body) !important;
	font-size: var(--kg-text-size) !important;
	line-height: 1.75 !important;
}

/* Image box ---------------------------------------------------------------- */
body .elementor-widget-image-box .elementor-image-box-img img {
	border-radius: var(--kg-radius);
}

body .elementor-widget-image-box .elementor-image-box-title {
	margin: 12px 0 6px;
	color: var(--kg-navy) !important;
	font-family: var(--kg-font-heading) !important;
	font-weight: 700 !important;
	line-height: 1.25;
}

body .elementor-widget-image-box .elementor-image-box-title a {
	color: inherit !important;
	text-decoration: none;
}

body .elementor-widget-image-box .elementor-image-box-description {
	font-family: var(--kg-font-body) !important;
	line-height: 1.6;
}

/* Divider ------------------------------------------------------------------ */
body .elementor-widget-divider {
	--divider-color: var(--kg-line) !important;
}

/* Counter ------------------------------------------------------------------ */
body .elementor-counter .elementor-counter-number-wrapper {
	color: var(--kg-navy) !important;
	font-family: var(--kg-font-heading) !important;
	font-weight: 800 !important;
	letter-spacing: -.04em;
}

body .elementor-counter .elementor-counter-number-suffix,
body .elementor-counter .elementor-counter-number-prefix {
	color: var(--kg-copper) !important;
}

body .elementor-counter .elementor-counter-title {
	color: var(--kg-muted) !important;
	font-family: var(--kg-font-body) !important;
	font-size: 15px !important;
	line-height: 1.5 !important;
}

/* Heading widget (244 uses) ------------------------------------------------ */
body .elementor-widget-heading .elementor-heading-title {
	font-family: var(--kg-font-heading) !important;
	font-weight: 700;
	letter-spacing: -.02em;
	line-height: 1.2;
	text-wrap: balance;
}

/* Default sizes (per-widget typography from Elementor still wins). */
body .elementor-widget-heading h1.elementor-heading-title {
	font-size: clamp(30px, 1.6vw + 22px, 44px);
	font-weight: 800;
	line-height: 1.14;
	letter-spacing: -.025em;
}

body .elementor-widget-heading h2.elementor-heading-title {
	font-size: clamp(24px, .8vw + 19px, 31px);
}

body .elementor-widget-heading h3.elementor-heading-title {
	font-size: clamp(20px, .4vw + 17px, 23px);
}

/* Colour forced everywhere except the home page (rebuilt in Stage 3; its hero
   uses light text on a coloured section). */
body:not(.home) .elementor-widget-heading .elementor-heading-title {
	color: var(--kg-navy) !important;
}

body:not(.home) .elementor-widget-heading .elementor-heading-title a {
	color: inherit !important;
}

/* Icon list / social icons: keep shapes, align colours */
body .elementor-icon-list-icon i,
body .elementor-icon-list-icon svg {
	color: var(--kg-copper) !important;
	fill: var(--kg-copper) !important;
}

/* ==========================================================================
   10. Tables
   ========================================================================== */
body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) table:not(.tablepress) {
	width: 100%;
	margin: 0 0 1.4em;
	border-collapse: collapse;
	font-size: .92em;
	line-height: 1.5;
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) table:not(.tablepress) :is(th, td) {
	padding: 10px 12px;
	border: 1px solid var(--kg-line);
	vertical-align: top;
	text-align: left;
}

body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) table:not(.tablepress) th,
body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) table:not(.tablepress) thead td {
	background: var(--kg-paper);
	color: var(--kg-navy);
	font-weight: 700;
}

/* TablePress 3 exposes CSS variables. */
body .tablepress {
	--text-color: var(--kg-ink);
	--head-text-color: var(--kg-navy);
	--head-bg-color: var(--kg-paper);
	--head-active-bg-color: #e4e1d8;
	--head-active-text-color: var(--kg-navy);
	--head-sort-arrow-color: var(--kg-copper);
	--odd-text-color: var(--kg-ink);
	--odd-bg-color: var(--kg-card);
	--even-text-color: var(--kg-ink);
	--even-bg-color: #faf8f2;
	--hover-text-color: var(--kg-navy);
	--hover-bg-color: #f1ece3;
	--border-color: var(--kg-card-line);
	--padding: .7rem .85rem;
	margin: 0 0 1.4em;
	border: 1px solid var(--kg-card-line);
	border-radius: var(--kg-radius);
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	font-family: var(--kg-font-body);
	font-size: 15px;
	line-height: 1.5;
}

body .tablepress :is(th, td) {
	border-top: 1px solid var(--kg-card-line);
}

body .tablepress tr:first-child :is(th, td),
body .tablepress thead + tbody tr:first-child :is(th, td) {
	border-top: 0;
}

body .tablepress thead th {
	font-family: var(--kg-font-heading);
	font-weight: 700;
	border-bottom: 1px solid var(--kg-card-line);
}

body .tablepress a {
	color: var(--kg-copper-text);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-color: rgba(141, 90, 66, .4);
	text-underline-offset: .2em;
}

body .tablepress a:hover {
	color: var(--kg-navy);
}

@media (max-width: 767px) {
	body .tablepress,
	body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) table:not(.tablepress) {
		display: block;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	body .tablepress {
		font-size: 14px;
	}

	body .tablepress :is(th, td) {
		min-width: 7.5em;
	}

	body .tablepress td a {
		white-space: nowrap;
	}
}

/* ==========================================================================
   11. Layout
   ========================================================================== */

/* Boxed content cards (Kadence "boxed" style) in the prototype card look. */
body.kg-theme.content-style-boxed .entry.single-entry,
body.kg-theme .entry.loop-entry {
	border: 1px solid var(--kg-card-line);
	border-radius: 14px;
	box-shadow: var(--kg-shadow-soft);
}

body.kg-theme .content-area {
	margin-top: 3rem;
	margin-bottom: 4rem;
}

@media (max-width: 767px) {
	body.kg-theme .content-area {
		margin-top: 1.25rem;
		margin-bottom: 2.5rem;
	}
}

/* Full-width Elementor pages (70 hub pages, course pages): keep a gutter on phones. */
@media (max-width: 767px) {
	body.kg-theme.content-width-fullwidth .entry-content > .elementor > .elementor-top-section:not(.kg-sec),
	body.kg-theme.elementor-template-full-width .elementor > .elementor-top-section:not(.kg-sec) {
		padding-left: 6px;
		padding-right: 6px;
	}
}

/* Elementor "Full width" pages (contacts, resources) start right under the
   header; give them breathing room. Home is rebuilt in Stage 3. */
body.kg-theme.elementor-template-full-width:not(.home) #inner-wrap {
	padding-top: clamp(1.25rem, 3vw, 2.5rem);
}

/* Single post: readable measure, roomy card. */
@media (min-width: 1025px) {
	body.single-post.content-style-boxed .entry-content-wrap {
		padding: 3rem 3.25rem;
	}
}

body.single-post .single-content > .elementor {
	max-width: var(--kg-measure);
	margin-inline: auto;
}

body.single-post .single-content > .elementor > .elementor-section > .elementor-container {
	max-width: none;
}

/* Post navigation & related posts (Kadence) */
body.kg-theme .post-navigation {
	border-color: var(--kg-line);
}

body.kg-theme .post-navigation a {
	color: var(--kg-navy);
	font-family: var(--kg-font-heading);
	font-weight: 700;
	text-decoration: none;
}

body.kg-theme .post-navigation a:hover {
	color: var(--kg-copper-text);
}

body.kg-theme .post-navigation .post-navigation-sub small {
	color: var(--kg-muted);
	font-family: var(--kg-font-body);
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}

body.kg-theme .entry-related {
	background: var(--kg-paper);
}

body.kg-theme .entry-related-title {
	font-family: var(--kg-font-heading);
	letter-spacing: -.02em;
}

/* Sidebar widgets as cards --------------------------------------------------- */
body.kg-theme .primary-sidebar.widget-area .widget {
	margin-bottom: 16px;
	padding: 22px 22px 20px;
	background: var(--kg-card);
	border: 1px solid var(--kg-card-line);
	border-radius: 14px;
	box-shadow: var(--kg-shadow-soft);
	color: var(--kg-text);
	font-size: 15px;
	line-height: 1.6;
}

body.kg-theme .primary-sidebar.widget-area .widget > .widget-title {
	margin: 0 0 14px;
	color: var(--kg-copper-text);
	font: 800 11px/1.4 var(--kg-font-heading);
	letter-spacing: .18em;
	text-transform: uppercase;
}

body.kg-theme .primary-sidebar .textwidget :is(h2, h3, h4, .widget-title) {
	margin: 0 0 .6em;
	color: var(--kg-navy);
	font: 700 15px/1.45 var(--kg-font-heading);
	letter-spacing: 0;
	text-transform: none;
}

body.kg-theme .primary-sidebar .textwidget :is(h2, h3, h4) span {
	font-size: inherit !important;
}

body.kg-theme .primary-sidebar .textwidget p {
	margin: 0 0 .7em;
}

body.kg-theme .primary-sidebar .textwidget p:last-child {
	margin-bottom: 0;
}

body.kg-theme .primary-sidebar .textwidget ul {
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
}

body.kg-theme .primary-sidebar .textwidget li {
	margin: 0;
	padding: 9px 0;
	border-top: 1px solid var(--kg-card-line);
}

body.kg-theme .primary-sidebar .textwidget li:first-child {
	border-top: 0;
}

body.kg-theme .primary-sidebar .textwidget a {
	color: var(--kg-navy);
	font-weight: 600;
	text-decoration: none;
}

body.kg-theme .primary-sidebar .textwidget a:hover {
	color: var(--kg-copper-text);
	text-decoration: underline;
}

body.kg-theme .primary-sidebar .textwidget img {
	display: block;
	float: none;
	width: 100%;
	max-width: 240px;
	height: auto;
	margin: 0 0 12px;
	border-radius: 10px;
}

/* Search widget */
body.kg-theme .widget_search .search-form {
	position: relative;
}

body.kg-theme .search-form input.search-field {
	width: 100%;
	min-height: 46px;
	padding: 10px 44px 10px 14px;
	border: 1px solid var(--kg-line);
	border-radius: var(--kg-radius-sm);
	background: #fff;
	color: var(--kg-ink);
	font: 400 15px/1.4 var(--kg-font-body);
	box-shadow: none;
}

body.kg-theme .search-form input.search-field:focus {
	border-color: var(--kg-copper);
}

body.kg-theme .search-form .kadence-search-icon-wrap {
	color: var(--kg-muted);
}

/* Archive cards, pagination and page headers: see section 12. */

/* Kadence form buttons (search submit etc.) */
body.kg-theme :is(input[type="submit"], .button, .wp-block-button__link):not(.elementor-button) {
	border-radius: var(--kg-radius-sm);
	font-family: var(--kg-font-body);
	font-weight: 700;
}

/* ==========================================================================
   12. Templates (Stage 2): page header, cards, pagination, single post
   ========================================================================== */

/* Eyebrow label (prototype .eyebrow) */
.kg-eyebrow,
body .kg-eyebrow .elementor-widget-container > p {
	margin: 0 0 22px;
	color: #8d614c;
	font: 800 11px/1.5 var(--kg-font-body);
	letter-spacing: .2em;
	text-transform: uppercase;
}

.kg-eyebrow--light,
body .kg-eyebrow--light .elementor-widget-container > p {
	color: #d9aa90;
}

.kg-eyebrow a {
	color: inherit !important;
	text-decoration: underline;
	text-decoration-color: rgba(217, 170, 144, .5);
	text-underline-offset: 4px;
}

.kg-eyebrow a:hover {
	color: #fff !important;
}

.kg-eyebrow__sep {
	margin: 0 .45em;
	opacity: .6;
}

.kg-button--light {
	background: var(--kg-cream);
	color: var(--kg-navy) !important;
}

.kg-button--light:hover {
	background: #fff;
	box-shadow: 0 7px 25px rgba(0, 0, 0, .14);
}

/* Navy band shared by the archive header, the post CTA and Elementor landing
   sections (prototype .hero / .sub-hero background). */
.kg-subhero,
.kg-post-cta,
body .elementor-section.kg-band-navy {
	background:
		radial-gradient(ellipse at 15% 0%, rgba(101, 115, 123, .15), transparent 60%),
		linear-gradient(125deg, #1e3445, #122433);
	color: #fff;
}

/* Page header ------------------------------------------------------------- */
.kg-subhero {
	padding: clamp(48px, 6vw, 80px) 0 clamp(48px, 6vw, 76px);
}

.kg-subhero__inner > :last-child {
	margin-bottom: 0;
}

body.kg-theme .kg-subhero__title {
	max-width: 900px;
	margin: 0;
	color: #fff;
	font: 700 clamp(38px, 4.6vw, 66px)/1.07 var(--kg-font-display);
	letter-spacing: -.045em;
	text-wrap: balance;
	overflow-wrap: anywhere;
}

.kg-subhero__lead {
	max-width: 640px;
	margin: 22px 0 0;
	color: #c4d0d5;
	font-size: 17px;
	line-height: 1.7;
}

.kg-subhero__count {
	margin: 22px 0 0;
	color: #9aabb5;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .06em;
}

.kg-subhero__search {
	max-width: 620px;
	margin-top: 28px;
}

/* Search form (page header) */
.kg-search {
	display: flex;
	gap: 8px;
}

body.kg-theme .kg-search__field {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 52px;
	padding: 12px 16px;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: var(--kg-radius-sm);
	background: rgba(255, 255, 255, .96);
	color: var(--kg-ink);
	font: 400 16px/1.3 var(--kg-font-body);
	box-shadow: none;
}

body.kg-theme .kg-search__field:focus {
	border-color: var(--kg-copper);
	outline: 3px solid var(--kg-copper);
	outline-offset: 1px;
}

body.kg-theme .kg-search__submit {
	flex: none;
	min-height: 52px;
	padding: 12px 22px;
	border: 0;
	border-radius: var(--kg-radius-sm);
	background: var(--kg-accent);
	color: #fff;
	font: 700 15px/1.2 var(--kg-font-body);
	cursor: pointer;
	transition: background .2s;
}

body.kg-theme .kg-search__submit:hover {
	background: var(--kg-accent-hover);
}

/* Less top space under a page header. */
body.kg-has-subhero .content-area {
	margin-top: clamp(1.75rem, 3vw, 3rem);
}

/* Card grid (archives, related posts, [kigetss_posts]) ------------------------ */
body.kg-archive #archive-container,
.kg-card-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

body.kg-archive #archive-container > .kg-card-item,
.kg-card-grid > .kg-card-item {
	display: flex;
	min-width: 0;
	margin: 0;
	padding: 0;
}

@media (max-width: 1024px) {
	body.kg-archive #archive-container,
	.kg-card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	body.kg-archive #archive-container,
	.kg-card-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
	}
}

.kg-post-card {
	position: relative;
	display: flex;
	flex: 1 1 auto; /* fill the grid cell (Kadence makes the <li> a column flexbox) */
	flex-direction: column;
	width: 100%;
	overflow: hidden;
	background: var(--kg-card);
	border: 1px solid var(--kg-card-line);
	border-radius: var(--kg-radius);
	box-shadow: var(--kg-shadow-soft);
	transition: transform .3s var(--kg-ease), box-shadow .3s, border-color .3s;
}

/* Copper line that grows on hover (prototype .course-card) */
.kg-post-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 24px;
	right: 24px;
	z-index: 1;
	height: 3px;
	background: var(--kg-copper);
	transform: scaleX(.16);
	transform-origin: left;
	transition: transform .35s var(--kg-ease);
}

.kg-post-card:hover,
.kg-post-card:focus-within {
	transform: translateY(-4px);
	border-color: #c8b4a5;
	box-shadow: var(--kg-shadow-lift);
}

.kg-post-card:hover::before,
.kg-post-card:focus-within::before {
	transform: scaleX(1);
}

.kg-post-card__media {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--kg-paper);
}

.kg-post-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0 !important;
	transition: transform .6s var(--kg-ease);
}

.kg-post-card:hover .kg-post-card__media img {
	transform: scale(1.03);
}

.kg-post-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 24px 24px 18px;
}

.kg-post-card__label {
	color: #9a6952;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: .13em;
	line-height: 1.5;
	text-transform: uppercase;
}

body.kg-theme .kg-post-card__title {
	margin: 12px 0 20px;
	color: var(--kg-navy);
	font: 700 19px/1.3 var(--kg-font-heading);
	letter-spacing: -.015em;
	text-wrap: balance;
}

body.kg-theme .kg-post-card__label + .kg-post-card__title {
	margin-top: 10px;
}

body.kg-theme .kg-post-card__title:first-child {
	margin-top: 0;
}

body.kg-theme .kg-post-card__title a {
	color: inherit;
	text-decoration: none;
}

/* Stretched link: the whole card is the title link. */
.kg-post-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
}

body.kg-theme .kg-post-card__title a:focus-visible {
	outline: none;
}

.kg-post-card:has(.kg-post-card__title a:focus-visible) {
	outline: 3px solid var(--kg-copper);
	outline-offset: 3px;
}

.kg-post-card__excerpt {
	margin: -8px 0 20px;
	color: var(--kg-muted);
	font-size: 14px;
	line-height: 1.6;
}

.kg-post-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid #e9e6dd;
}

.kg-post-card__meta {
	color: var(--kg-muted);
	font-size: 13px;
}

.kg-post-card__arrow {
	color: #75818a;
	font-size: 19px;
	line-height: 1;
	transition: color .2s, translate .25s;
}

.kg-post-card:hover .kg-post-card__arrow {
	color: var(--kg-copper);
	translate: 3px -3px;
}

@media (hover: none) {
	.kg-post-card:hover {
		transform: none;
	}
}

/* Pagination -------------------------------------------------------------- */
body.kg-theme .pagination {
	margin-top: 40px;
}

body.kg-theme .pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
}

body.kg-theme .pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	margin: 0;
	padding: 0 12px;
	box-sizing: border-box;
	border: 1px solid var(--kg-line);
	border-radius: var(--kg-radius-sm);
	background: var(--kg-card);
	color: var(--kg-navy);
	font: 700 14px/1 var(--kg-font-body);
	text-decoration: none;
	transition: background .2s, border-color .2s, color .2s;
}

body.kg-theme .pagination a.page-numbers:hover {
	border-color: var(--kg-navy);
	background: var(--kg-paper);
	color: var(--kg-navy);
}

body.kg-theme .pagination .page-numbers.current {
	border-color: var(--kg-navy);
	background: var(--kg-navy);
	color: #fff;
}

body.kg-theme .pagination .page-numbers.dots {
	min-width: 24px;
	padding: 0 4px;
	border-color: transparent;
	background: transparent;
}

body.kg-theme .pagination .page-numbers svg {
	width: 16px;
	height: 16px;
}

@media (max-width: 480px) {
	body.kg-theme .pagination .page-numbers {
		min-width: 40px;
		height: 40px;
		padding: 0 9px;
	}
}

/* Empty states (no search results, empty archive) ----------------------------- */
body.kg-archive .content-area .error {
	max-width: 760px;
}

body.kg-archive .content-area .error .page-content {
	padding: 28px;
	background: var(--kg-card);
	border: 1px dashed #d6d2c6;
	border-radius: var(--kg-radius);
	color: var(--kg-text);
	font-size: 17px;
}

body.kg-archive .content-area .error .search-form {
	margin-top: 16px;
}

/* 404 */
body.error404 .content-area .entry,
body.error404 .content-area .content-bg {
	background: transparent;
	border: 0;
	box-shadow: none;
}

body.kg-theme .kg-section-title {
	margin: 0 0 18px;
	color: var(--kg-navy);
	font: 700 22px/1.3 var(--kg-font-heading);
	letter-spacing: -.015em;
}

.kg-not-found {
	max-width: 860px;
}

.kg-hub-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (max-width: 600px) {
	.kg-hub-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.kg-hub-card {
	margin: 0;
}

body.kg-theme .kg-hub-card a {
	display: flex;
	flex-direction: column;
	gap: 6px;
	height: 100%;
	padding: 20px 22px;
	box-sizing: border-box;
	background: var(--kg-card);
	border: 1px solid var(--kg-card-line);
	border-radius: var(--kg-radius);
	text-decoration: none;
	transition: border-color .2s, transform .2s var(--kg-ease), box-shadow .2s;
}

body.kg-theme .kg-hub-card a:hover {
	border-color: #c8b4a5;
	box-shadow: var(--kg-shadow-lift);
	transform: translateY(-2px);
}

.kg-hub-card__title {
	color: var(--kg-navy);
	font: 700 17px/1.3 var(--kg-font-heading);
}

.kg-hub-card__title span {
	color: var(--kg-copper);
}

.kg-hub-card__text {
	color: var(--kg-muted);
	font-size: 14px;
	line-height: 1.55;
}

.kg-not-found__home {
	margin: 24px 0 0;
	font-weight: 700;
}

/* Single post ------------------------------------------------------------- */
.kg-post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	max-width: var(--kg-measure);
	margin: 0 auto 26px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--kg-card-line);
	color: var(--kg-muted);
	font-size: 13px;
	line-height: 1.5;
}

.kg-post-meta > * + *::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 4px;
	margin-right: 14px;
	border-radius: 50%;
	background: var(--kg-copper);
	vertical-align: middle;
}

body.kg-theme .kg-post-meta__cat {
	color: var(--kg-copper-text);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .14em;
	text-decoration: none;
	text-transform: uppercase;
}

body.kg-theme .kg-post-meta__cat:hover {
	color: var(--kg-navy);
	text-decoration: underline;
}

/* CTA after the content (prototype .detail-cta) */
.kg-post-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	max-width: var(--kg-measure);
	margin: 44px auto 0;
	padding: 30px 32px;
	box-sizing: border-box;
	border-radius: var(--kg-radius);
}

.kg-post-cta__eyebrow {
	margin: 0 0 8px;
	color: #d9aa90;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .18em;
	text-transform: uppercase;
}

.kg-post-cta__title {
	margin: 0;
	color: #fff;
	font: 700 23px/1.3 var(--kg-font-display);
	letter-spacing: -.02em;
}

.kg-post-cta__button {
	flex: none;
}

@media (max-width: 767px) {
	.kg-post-cta {
		flex-direction: column;
		align-items: flex-start;
		padding: 24px 22px;
	}

	.kg-post-cta__title {
		font-size: 21px;
	}
}

/* Related posts */
.kg-related {
	margin-top: 40px;
}

.kg-related__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	margin-bottom: 18px;
}

body.kg-theme .kg-related__title {
	margin: 0;
	color: var(--kg-navy);
	font: 700 clamp(28px, 2.4vw, 36px)/1.15 var(--kg-font-display);
	letter-spacing: -.035em;
}

body.kg-theme .kg-related__all {
	color: var(--kg-navy);
	font-size: 14px;
	font-weight: 800;
	text-decoration: none;
	border-bottom: 1px solid currentColor;
}

body.kg-theme .kg-related__all:hover {
	color: var(--kg-copper-text);
}

body.kg-theme.single-post .post-navigation {
	margin-top: 40px;
}

/* Sidebar on phones and tablets comes after the article (DOM order). */
@media (max-width: 1024px) {
	body.kg-theme.has-left-sidebar .primary-sidebar {
		margin-top: 32px;
	}
}

/* TablePress on phones -------------------------------------------------------
   Narrow tables (up to 3 columns; every table on the site is
   "Курс | Стоимость | Подробнее") become stacked cards. Wider tables scroll
   horizontally with shadows at the overflowing edge as the affordance. */
@media (max-width: 767px) {
	body .tablepress:not(:has(tr > :nth-child(4))) {
		display: block;
		overflow: visible;
		border: 0;
		border-radius: 0;
		background: transparent;
	}

	body .tablepress:not(:has(tr > :nth-child(4))) :is(thead, tbody, tfoot) {
		display: block;
	}

	body .tablepress:not(:has(tr > :nth-child(4))) tr {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
		margin-bottom: 10px;
		padding: 16px;
		background: var(--kg-card);
		border: 1px solid var(--kg-card-line);
		border-radius: var(--kg-radius);
	}

	body .tablepress:not(:has(tr > :nth-child(4))) :is(th, td) {
		display: block;
		min-width: 0;
		padding: 0;
		border: 0 !important;
		background: transparent !important;
	}

	body .tablepress:not(:has(tr > :nth-child(4))) tr > :first-child {
		flex: 1 1 100%;
		margin-bottom: 4px;
		color: var(--kg-navy);
		font: 700 16px/1.4 var(--kg-font-heading);
	}

	body .tablepress:not(:has(tr > :nth-child(4))) td:not(:first-child) a {
		display: inline-flex;
		align-items: center;
		min-height: 40px;
		padding: 8px 14px;
		box-sizing: border-box;
		border: 1px solid var(--kg-line);
		border-radius: 999px;
		background: #fff;
		color: var(--kg-navy);
		font-size: 14px;
		text-decoration: none;
		white-space: nowrap;
	}

	body .tablepress:not(:has(tr > :nth-child(4))) td:not(:first-child) a:hover {
		border-color: var(--kg-navy);
	}

	body .tablepress:has(tr > :nth-child(4)),
	body :is(.elementor-widget-text-editor, .entry-content:not(:has(.elementor))) table:not(.tablepress) {
		background:
			linear-gradient(90deg, var(--kg-card) 30%, rgba(255, 253, 248, 0)) left / 32px 100% no-repeat local,
			linear-gradient(270deg, var(--kg-card) 30%, rgba(255, 253, 248, 0)) right / 32px 100% no-repeat local,
			radial-gradient(farthest-side at 0 50%, rgba(23, 40, 56, .2), transparent) left / 12px 100% no-repeat scroll,
			radial-gradient(farthest-side at 100% 50%, rgba(23, 40, 56, .2), transparent) right / 12px 100% no-repeat scroll,
			var(--kg-card);
	}

	body .tablepress:has(tr > :nth-child(4)) :is(th, td) {
		background-color: transparent;
	}
}

/* ==========================================================================
   13. Landing sections for Elementor pages (Stage 3)
   Home, courses catalog, contacts, about and the library templates are
   built from legacy Elementor sections whose "CSS classes" field carries
   these kg-* classes (written by kigetss-wp/migrations). Widgets keep no
   style settings of their own, so the owner edits only texts and images.
   Section:  kg-sec + kg-sec--cream | --paper | --sand | kg-band-navy,
             layout kg-head | kg-split | kg-grid kg-grid--N | kg-hero | kg-metrics.
   Widgets:  kg-eyebrow, kg-display, kg-lead, kg-intro, kg-body, kg-btn--*,
             kg-card__*, kg-steps, kg-checklist, kg-contact-card …
   ========================================================================== */

/* Section frame ------------------------------------------------------------ */
body .elementor-section.kg-sec {
	padding: clamp(64px, 8vw, 112px) var(--kg-gutter);
}

body .elementor-section.kg-sec > .elementor-container {
	max-width: calc(var(--kg-shell) - 3rem);
	gap: clamp(28px, 5vw, 80px);
}

/* Elementor lets columns wrap from 1024px down; with our column gap they
   would wrap too early. Keep side-by-side columns until phone width. */
@media (min-width: 768px) {
	body .elementor-section.kg-sec:not(.kg-grid) > .elementor-container {
		flex-wrap: nowrap;
	}
}

body .elementor-section.kg-sec--cream {
	background: var(--kg-cream);
}

body .elementor-section.kg-sec--paper {
	background: var(--kg-paper);
}

body .elementor-section.kg-sec--sand {
	background: #e9e7df;
}

/* A heading row continues into the next section of the same colour. */
body .elementor-section.kg-head {
	padding-bottom: clamp(28px, 3.5vw, 44px);
}

body .elementor-section.kg-head > .elementor-container {
	align-items: flex-end;
}

body .elementor-section.kg-head + .kg-sec,
body .elementor-section.kg-sec--tight,
body .elementor-section.kg-sec--method + .kg-sec--methods,
body .elementor-section.kg-founder + .kg-certs {
	padding-top: 0;
}

body .elementor-section.kg-split > .elementor-container {
	align-items: center;
}

body .elementor-section.kg-split--top > .elementor-container {
	align-items: flex-start;
}

/* Widgets inside landing sections: spacing is set here, not per widget. */
body .kg-sec .elementor-widget:not(:last-child) {
	margin-bottom: 20px;
}

body .kg-sec .elementor-widget.elementor-widget__width-auto {
	margin-right: 12px;
	margin-bottom: 12px;
}

/* Grids: columns wrap; N per row whatever their Elementor width. */
body .elementor-section.kg-grid > .elementor-container {
	--kg-cols: 3;
	--kg-gap: 18px;
	flex-wrap: wrap;
	gap: var(--kg-gap);
}

body .elementor-section.kg-grid--2 > .elementor-container { --kg-cols: 2; }
body .elementor-section.kg-grid--4 > .elementor-container { --kg-cols: 4; }
body .elementor-section.kg-grid--5 > .elementor-container { --kg-cols: 5; --kg-gap: 14px; }

body .elementor-section.kg-grid > .elementor-container > .elementor-column {
	width: calc((100% - (var(--kg-cols) - 1) * var(--kg-gap)) / var(--kg-cols)) !important;
}

@media (max-width: 1024px) {
	body .elementor-section.kg-grid--3 > .elementor-container,
	body .elementor-section.kg-grid--4 > .elementor-container { --kg-cols: 2; }
	body .elementor-section.kg-grid--5 > .elementor-container { --kg-cols: 3; }
}

@media (max-width: 767px) {
	body .elementor-section.kg-grid > .elementor-container { --kg-cols: 1; --kg-gap: 14px; }
	body .elementor-section.kg-grid--5 > .elementor-container { --kg-cols: 2; }
}

/* Type -------------------------------------------------------------------- */
body .kg-sec .elementor-widget.kg-eyebrow {
	margin-bottom: 20px;
}

body .kg-sec .kg-eyebrow .elementor-widget-container > p {
	margin: 0;
}

body .elementor-widget-heading.kg-display .elementor-heading-title {
	margin: 0;
	color: var(--kg-navy) !important;
	font: 700 clamp(36px, 4.2vw, 62px)/1.08 var(--kg-font-display) !important;
	letter-spacing: -.045em;
	text-wrap: balance;
}

body .elementor-widget-heading.kg-display--hero .elementor-heading-title {
	font-size: clamp(42px, 5vw, 76px) !important;
	line-height: 1.05 !important;
}

body .elementor-widget-heading.kg-display--sm .elementor-heading-title {
	font-size: clamp(30px, 3vw, 44px) !important;
}

body .elementor-widget-heading.kg-subdisplay .elementor-heading-title {
	margin: 0;
	color: var(--kg-navy) !important;
	font: 700 clamp(26px, 2.4vw, 34px)/1.2 var(--kg-font-display) !important;
	letter-spacing: -.03em;
}

body .elementor-widget-heading:is(.kg-display, .kg-subdisplay) .elementor-heading-title em {
	color: #a76f54;
	font-style: normal;
}

body .kg-sec .elementor-widget-text-editor:is(.kg-intro, .kg-body) {
	color: #5f6870;
	font-size: 16px;
	line-height: 1.8;
}

/* Width limits go on the inner container: the widget itself must stay full
   width so that inline (auto-width) buttons after it start a new row. */
body .kg-sec .elementor-widget-text-editor.kg-intro > .elementor-widget-container {
	max-width: 460px;
}

body .kg-sec .elementor-widget-text-editor.kg-lead {
	font-size: 17px;
	line-height: 1.75;
}

body .kg-sec .elementor-widget-text-editor.kg-lead > .elementor-widget-container {
	max-width: 560px;
}

body .kg-sec .elementor-widget-text-editor a.kg-more {
	display: inline-block;
	margin: 4px 22px 0 0;
	border-bottom: 1px solid currentColor;
	color: var(--kg-navy);
	font-size: 14px;
	font-weight: 800;
	text-decoration: none;
}

body .kg-sec .elementor-widget-text-editor a.kg-more:hover {
	color: var(--kg-copper-text);
}

/* Navy bands: light text. */
body .kg-band-navy .elementor-widget-text-editor {
	color: #c5d0d6;
}

body .kg-band-navy .elementor-widget-text-editor :is(strong, b) {
	color: #fff;
}

body .kg-band-navy .elementor-widget-text-editor a:not(.elementor-button) {
	color: #f1cfbc;
	text-decoration-color: rgba(241, 207, 188, .5);
}

body .kg-band-navy .elementor-widget-text-editor a:not(.elementor-button):hover {
	color: #fff;
}

body .kg-band-navy .elementor-widget-heading:is(.kg-display, .kg-subdisplay) .elementor-heading-title {
	color: #fff !important;
}

body .kg-band-navy .elementor-widget-heading:is(.kg-display, .kg-subdisplay) .elementor-heading-title em {
	color: #d69b7d;
}

/* Buttons (variants by widget class; Stage 1 makes every button navy) ------------- */
body .elementor-widget-button.kg-btn--accent .elementor-button {
	background: var(--kg-accent) !important;
}

body .elementor-widget-button.kg-btn--accent .elementor-button:is(:hover, :focus-visible) {
	background: var(--kg-accent-hover) !important;
}

body .elementor-widget-button.kg-btn--primary .elementor-button {
	background: var(--kg-navy) !important;
}

body .elementor-widget-button.kg-btn--light .elementor-button {
	background: var(--kg-cream) !important;
	color: var(--kg-navy) !important;
}

body .elementor-widget-button.kg-btn--light .elementor-button:is(:hover, :focus-visible) {
	background: #fff !important;
	color: var(--kg-navy) !important;
	box-shadow: 0 7px 25px rgba(0, 0, 0, .18) !important;
}

body .elementor-widget-button.kg-btn--outline .elementor-button {
	background: transparent !important;
	border-color: rgba(255, 255, 255, .45) !important;
	color: #fff !important;
}

body .elementor-widget-button.kg-btn--outline .elementor-button:is(:hover, :focus-visible) {
	background: rgba(255, 255, 255, .08) !important;
	border-color: #fff !important;
	color: #fff !important;
	box-shadow: none !important;
}

body .elementor-widget-button.kg-btn--outline-dark .elementor-button {
	background: transparent !important;
	border-color: var(--kg-navy) !important;
	color: var(--kg-navy) !important;
}

body .elementor-widget-button.kg-btn--outline-dark .elementor-button:is(:hover, :focus-visible) {
	background: var(--kg-navy) !important;
	color: #fff !important;
}

/* Outline buttons on light sections read as dark outline. */
body .kg-sec:not(.kg-band-navy) .elementor-widget-button.kg-btn--outline .elementor-button {
	border-color: var(--kg-navy) !important;
	color: var(--kg-navy) !important;
}

body .kg-sec:not(.kg-band-navy) .elementor-widget-button.kg-btn--outline .elementor-button:is(:hover, :focus-visible) {
	background: var(--kg-navy) !important;
	color: #fff !important;
}

/* Hero --------------------------------------------------------------------- */
body .elementor-section.kg-hero {
	padding-top: clamp(36px, 5vw, 64px);
	padding-bottom: clamp(36px, 5vw, 64px);
}

body .elementor-section.kg-hero > .elementor-container {
	align-items: center;
	min-height: min(620px, calc(100vh - var(--kg-header-h)));
}

body .kg-hero .kg-lead {
	margin-top: 8px;
	margin-bottom: 32px !important;
}

.kg-hero__photo .wp-caption,
.kg-hero__photo .elementor-widget-container > img {
	position: relative;
	display: block;
	margin: 0;
	overflow: hidden;
	border-radius: 14px;
	background: #263e4a;
	box-shadow: 0 20px 55px rgba(7, 21, 34, .3);
}

body .kg-hero__photo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: center 22%;
	border-radius: 0 !important;
	filter: saturate(.85);
}

.kg-hero__photo .wp-caption::after {
	content: "";
	position: absolute;
	inset: 45% 0 0;
	background: linear-gradient(transparent, rgba(9, 20, 30, .82));
	pointer-events: none;
}

body .kg-hero__photo .widget-image-caption {
	position: absolute;
	left: 26px;
	right: 26px;
	bottom: 24px;
	z-index: 1;
	margin: 0;
	color: #fff;
	font: 700 clamp(17px, 1.7vw, 22px)/1.25 var(--kg-font-display);
	letter-spacing: -.01em;
	text-align: left;
}

/* Metrics (real counters from the old home page) ------------------------------- */
body .elementor-section.kg-metrics > .elementor-container {
	gap: 0;
	overflow: hidden;
	border: 1px solid var(--kg-line);
	border-radius: 10px;
	background: rgba(255, 255, 255, .26);
}

body .kg-metrics > .elementor-container > .elementor-column {
	padding: 28px 26px 26px;
	transition: background .25s;
}

body .kg-metrics > .elementor-container > .elementor-column + .elementor-column {
	border-left: 1px solid var(--kg-line);
}

body .kg-metrics > .elementor-container > .elementor-column:hover {
	background: rgba(255, 255, 255, .6);
}

body .kg-metric .elementor-counter {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
}

body .kg-metric .elementor-counter .elementor-counter-number-wrapper {
	order: 0;
	justify-content: flex-start;
	color: var(--kg-navy) !important;
	font: 700 56px/1 var(--kg-font-display) !important;
	letter-spacing: -.06em;
}

body .kg-metric .elementor-counter .elementor-counter-number-prefix,
body .kg-metric .elementor-counter .elementor-counter-number-suffix {
	flex-grow: 0;
	color: var(--kg-copper) !important;
}

body .kg-metric .elementor-counter .elementor-counter-title {
	order: 1;
	max-width: 240px;
	margin-top: 16px;
	color: #667078 !important;
	font-size: 13.5px !important;
	line-height: 1.55 !important;
	text-align: left;
	justify-content: flex-start;
}

@media (max-width: 767px) {
	body .elementor-section.kg-metrics > .elementor-container {
		flex-wrap: wrap;
	}

	body .kg-metrics > .elementor-container > .elementor-column {
		width: 50% !important;
		padding: 22px 16px;
	}

	body .kg-metrics > .elementor-container > .elementor-column:nth-child(odd) {
		border-left: 0;
	}

	body .kg-metrics > .elementor-container > .elementor-column:nth-child(n + 3) {
		border-top: 1px solid var(--kg-line);
	}

	body .kg-metric .elementor-counter .elementor-counter-number-wrapper {
		font-size: 44px !important;
	}

	body .kg-metric .elementor-counter .elementor-counter-title {
		font-size: 12.5px !important;
	}
}

/* Cards (directions grid, library template "Карточки направлений") ------------- */
body .kg-card > .elementor-widget-wrap {
	position: relative;
	padding: 26px 26px 20px !important;
	overflow: hidden;
	background: var(--kg-card);
	border: 1px solid var(--kg-card-line);
	border-radius: var(--kg-radius);
	box-shadow: var(--kg-shadow-soft);
	transition: transform .3s var(--kg-ease), box-shadow .3s, border-color .3s;
}

body .kg-card > .elementor-widget-wrap::before {
	content: "";
	position: absolute;
	top: 0;
	left: 26px;
	right: 26px;
	height: 3px;
	background: var(--kg-copper);
	transform: scaleX(.16);
	transform-origin: left;
	transition: transform .35s var(--kg-ease);
}

body .kg-card:hover > .elementor-widget-wrap {
	transform: translateY(-4px);
	border-color: #c8b4a5;
	box-shadow: var(--kg-shadow-lift);
}

body .kg-card:is(:hover, :focus-within) > .elementor-widget-wrap::before {
	transform: scaleX(1);
}

body .kg-card .kg-card__label .elementor-widget-container > p {
	margin: 0;
	color: #9a6952;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: .13em;
	line-height: 1.5;
	text-transform: uppercase;
}

body .kg-sec .kg-card .elementor-widget.kg-card__label {
	margin-bottom: 26px;
}

body .elementor-widget-heading.kg-card__title .elementor-heading-title {
	color: var(--kg-navy) !important;
	font: 700 27px/1.12 var(--kg-font-display) !important;
	letter-spacing: -.035em;
}

body .elementor-widget-heading.kg-card__title .elementor-heading-title a {
	color: inherit !important;
	text-decoration: none;
}

body .elementor-widget-heading.kg-card__title .elementor-heading-title a:hover {
	color: var(--kg-copper-text) !important;
}

body .kg-sec .elementor-widget-text-editor.kg-card__text {
	color: #69737a;
	font-size: 14px;
	line-height: 1.65;
}

body .kg-sec .elementor-widget-text-editor.kg-card__links ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

body .kg-sec .elementor-widget-text-editor.kg-card__links li {
	margin: 0;
	padding: 0;
	border-top: 1px solid #e3e1d9;
}

body .kg-sec .elementor-widget-text-editor.kg-card__links li a:not(.elementor-button) {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	color: var(--kg-navy);
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none;
}

body .kg-sec .elementor-widget-text-editor.kg-card__links li a:not(.elementor-button)::after {
	content: "↗";
	flex: none;
	color: #9aa3a9;
	font-weight: 400;
	transition: color .2s, translate .2s;
}

body .kg-sec .elementor-widget-text-editor.kg-card__links li a:not(.elementor-button):hover {
	color: var(--kg-copper-text);
}

body .kg-sec .elementor-widget-text-editor.kg-card__links li a:not(.elementor-button):hover::after {
	color: var(--kg-copper);
	translate: 2px -2px;
}

/* Steps (method) and lists on navy ----------------------------------------------- */
@media (min-width: 1025px) {
	body .kg-sticky > .elementor-widget-wrap {
		position: sticky;
		top: calc(var(--kg-header-h) + 32px);
		align-self: flex-start;
	}

	body .elementor-section.kg-sec--method > .elementor-container {
		align-items: flex-start;
	}
}

body .kg-sec .kg-steps ol {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: kg-step;
}

body .kg-sec .kg-steps li {
	position: relative;
	margin: 0;
	padding: 24px 0 26px 66px;
	border-top: 1px solid #40515e;
	color: #afbdc5;
	font-size: 15px;
	line-height: 1.7;
	counter-increment: kg-step;
}

body .kg-sec .kg-steps li:last-child {
	border-bottom: 1px solid #40515e;
}

body .kg-sec .kg-steps li::before {
	content: counter(kg-step, decimal-leading-zero);
	position: absolute;
	top: 22px;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 43px;
	height: 43px;
	border: 1px solid rgba(138, 119, 102, .45);
	border-radius: 50%;
	color: #d69b7d;
	font: 700 18px/1 var(--kg-font-display);
}

body .kg-sec .kg-steps li strong {
	display: block;
	margin-bottom: 6px;
	color: #fff;
	font: 700 23px/1.25 var(--kg-font-display);
	letter-spacing: -.015em;
}

/* Light sections: same list, dark colours. */
body .kg-sec:not(.kg-band-navy) .kg-steps li {
	border-color: var(--kg-line);
	color: #5f6870;
}

body .kg-sec:not(.kg-band-navy) .kg-steps li strong {
	color: var(--kg-navy);
}

/* The light copper of the navy bands is too faint on light backgrounds. */
body .kg-sec:not(.kg-band-navy) .kg-steps li::before {
	border-color: rgba(141, 90, 66, .45);
	color: #8d5a42;
}

body .kg-sec .kg-method-list ul {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 48px;
	margin: 0;
	padding: 0;
	list-style: none;
}

body .kg-sec .kg-method-list li {
	margin: 0;
	padding: 16px 0 18px;
	border-top: 1px solid #40515e;
	font-size: 14.5px;
	line-height: 1.65;
}

body .kg-sec .kg-method-list li strong {
	display: block;
	margin-bottom: 4px;
}

body .kg-sec:not(.kg-band-navy) .kg-method-list li {
	border-color: var(--kg-line);
}

@media (max-width: 767px) {
	body .kg-sec .kg-method-list ul {
		grid-template-columns: minmax(0, 1fr);
	}

	body .kg-sec .kg-steps li {
		padding-left: 58px;
	}

	body .kg-sec .kg-steps li strong {
		font-size: 21px;
	}
}

body .elementor-section.kg-sec--method {
	padding-bottom: clamp(40px, 5vw, 64px);
}

body .kg-sec--methods .elementor-widget.kg-subdisplay {
	max-width: 760px;
	margin-bottom: 28px;
}

/* Check list --------------------------------------------------------------- */
body .kg-sec .kg-checklist ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

body .kg-sec .kg-checklist li {
	margin: 0;
	padding: 14px 0;
	border-top: 1px solid var(--kg-line);
	color: var(--kg-ink);
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.5;
}

body .kg-sec .kg-checklist li::before {
	content: "↗";
	margin-right: 16px;
	color: #af7458;
	font-weight: 400;
}

/* Photos ------------------------------------------------------------------- */
body .kg-sec .kg-photo img,
body .kg-sec .kg-portrait img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	border-radius: var(--kg-radius) !important;
	box-shadow: var(--kg-shadow-lift);
}

body .kg-sec .kg-photo img {
	aspect-ratio: 4 / 3;
}

body .kg-sec .kg-portrait img {
	aspect-ratio: 1 / 1;
	object-position: center 20%;
}

body .elementor-section.kg-split--media > .elementor-container {
	align-items: center;
}

/* Signature (founder / teacher) */
body .kg-sec .kg-signature {
	padding-left: 17px;
	border-left: 2px solid var(--kg-copper);
}

body .kg-sec .kg-signature p {
	color: #68747b;
	font-size: 13px;
	line-height: 1.5;
}

body .kg-sec .kg-signature strong {
	display: inline-block;
	margin-bottom: 4px;
	color: var(--kg-navy);
	font: 700 25px/1.2 var(--kg-font-display);
}

/* Certificates */
body .kg-certs .kg-cert img {
	width: 100%;
	height: 170px;
	padding: 8px;
	box-sizing: border-box;
	object-fit: contain;
	background: #fff;
	border: 1px solid var(--kg-card-line);
	border-radius: var(--kg-radius-sm) !important;
	transition: transform .25s var(--kg-ease), box-shadow .25s;
}

body .kg-certs .kg-cert a:hover img {
	transform: translateY(-3px);
	box-shadow: var(--kg-shadow-lift);
}

/* Contact card (CTA band, contacts page) ------------------------------------------ */
body .kg-sec .elementor-widget-text-editor.kg-contact-card > .elementor-widget-container {
	padding: 32px 34px 26px;
	background: var(--kg-cream);
	border-top: 3px solid #bd896c;
	border-radius: var(--kg-radius);
	box-shadow: 0 20px 50px rgba(0, 0, 0, .14);
	color: var(--kg-navy);
}

body .kg-sec .elementor-widget-text-editor.kg-contact-card h3 {
	margin: 0 0 18px;
	color: var(--kg-navy) !important;
	font: 700 28px/1.2 var(--kg-font-display);
	letter-spacing: -.02em;
}

body .kg-sec .elementor-widget-text-editor.kg-contact-card p {
	margin: 0;
	padding: 13px 0;
	border-top: 1px solid var(--kg-line);
	color: var(--kg-navy);
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.55;
	overflow-wrap: anywhere;
}

body .kg-sec .elementor-widget-text-editor.kg-contact-card .kg-dt {
	display: inline-block;
	margin-bottom: 4px;
	color: #8b6d5f;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
}

body .kg-sec .elementor-widget-text-editor.kg-contact-card a:not(.elementor-button) {
	color: var(--kg-navy);
	text-decoration: none;
}

body .kg-sec .elementor-widget-text-editor.kg-contact-card a:not(.elementor-button):hover {
	color: var(--kg-copper-text);
	text-decoration: underline;
}

body .kg-sec .elementor-widget-text-editor.kg-contact-card p.kg-note {
	color: #737e84;
	font-size: 12.5px;
	font-weight: 400;
}

/* Posts shortcode inside a section */
body .kg-sec .kg-posts .kg-card-grid {
	margin: 0;
}

/* Mobile ------------------------------------------------------------------- */
@media (max-width: 767px) {
	body .elementor-section.kg-sec {
		padding-top: 64px;
		padding-bottom: 64px;
	}

	body .elementor-section.kg-head {
		padding-bottom: 28px;
	}

	body .elementor-section.kg-head > .elementor-container {
		gap: 12px;
	}

	body .elementor-section.kg-hero > .elementor-container {
		min-height: 0;
		gap: 32px;
	}

	body .kg-hero__photo img {
		aspect-ratio: 5 / 6;
	}

	body .kg-hero__photo .widget-image-caption {
		left: 20px;
		right: 20px;
		bottom: 18px;
		font-size: 19px;
	}

	body .elementor-widget-heading.kg-display .elementor-heading-title {
		font-size: clamp(34px, 9.5vw, 46px) !important;
	}

	body .elementor-widget-heading.kg-display--hero .elementor-heading-title {
		font-size: clamp(38px, 11vw, 52px) !important;
	}

	body .kg-sec .elementor-widget.elementor-widget__width-auto {
		margin-right: 8px;
	}

	body .kg-sec .elementor-widget-text-editor.kg-contact-card > .elementor-widget-container {
		padding: 26px 22px 20px;
	}

	body .kg-certs .kg-cert img {
		height: 140px;
	}
}

/* Inner pages (catalog, contacts, about) ----------------------------------------- */
body .elementor-section.kg-pagehero {
	padding-top: clamp(48px, 6vw, 88px);
	padding-bottom: clamp(48px, 6vw, 88px);
}

body .elementor-section.kg-sec--narrow > .elementor-container {
	max-width: 900px;
}

body .elementor-section.kg-sec--narrow.kg-pagehero > .elementor-container {
	max-width: calc(var(--kg-shell) - 3rem);
}

body .kg-pagehero .elementor-widget-heading.kg-display .elementor-heading-title {
	max-width: 900px;
}

/* Quick links to page sections (catalog header) */
body .kg-sec .kg-toc ul {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid #40515e;
}

body .kg-sec .kg-toc li {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #40515e;
}

body .kg-sec .kg-toc li a:not(.elementor-button) {
	display: flex;
	align-items: baseline;
	gap: 14px;
	padding: 13px 0;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none;
	transition: color .2s, padding .2s var(--kg-ease);
}

body .kg-sec .kg-toc li a:not(.elementor-button) span {
	flex: none;
	color: #d69b7d;
	font: 700 15px/1 var(--kg-font-display);
}

body .kg-sec .kg-toc li a:not(.elementor-button):hover {
	padding-left: 6px;
	color: #f1cfbc;
}

/* Course groups with TablePress tables */
body .kg-course-group .kg-table .tablepress {
	margin: 4px 0 0;
}

body .kg-course-group .kg-photo img {
	aspect-ratio: 4 / 3;
	/* Portrait photos (the kids and teens one is 683×815) are cut from the
	   bottom, not the middle, so heads stay in the frame; landscape ones
	   lose only their sides, where this has no effect. */
	object-position: 50% 0;
}

@media (min-width: 768px) {
	body .kg-course-group .elementor-column:first-child .elementor-widget-wrap {
		position: sticky;
		top: calc(var(--kg-header-h) + 32px);
	}
}

/* Rich text block (contacts checklist): lists and the quote */
body .kg-sec .elementor-widget-text-editor.kg-body--lg {
	color: var(--kg-text);
	font-size: 18px;
}

body .kg-sec .kg-rich ol {
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
	counter-reset: kg-rich;
}

body .kg-sec .kg-rich ol > li {
	position: relative;
	margin: 0;
	padding: 16px 0 14px 46px;
	border-top: 1px solid var(--kg-line);
	counter-increment: kg-rich;
}

body .kg-sec .kg-rich ol > li::before {
	content: counter(kg-rich, decimal-leading-zero);
	position: absolute;
	top: 15px;
	left: 0;
	color: #a76f54;
	font: 700 20px/1.3 var(--kg-font-display);
}

body .kg-sec .kg-rich ol > li > strong {
	color: var(--kg-navy);
}

body .kg-sec .kg-rich ol ul {
	margin: 8px 0 0;
	padding-left: 1.1em;
	font-size: 15px;
}

body .kg-sec .kg-rich blockquote {
	margin: 22px 0 0;
}

body .kg-sec .kg-photo--portrait img {
	aspect-ratio: 4 / 5;
	object-position: center 20%;
}

body .elementor-widget-heading.kg-card__title--sm .elementor-heading-title {
	font-size: 23px !important;
	line-height: 1.18 !important;
}

body .kg-sec .elementor-widget-text-editor.kg-legal {
	font-size: 14px;
}

/* Certificates: the link wraps the image, let it span the column. */
body .kg-certs .kg-cert a {
	display: block;
}

@media (max-width: 767px) {
	body .kg-sec .kg-rich ol > li {
		padding-left: 38px;
	}

	body .elementor-section.kg-pagehero {
		padding-top: 44px;
		padding-bottom: 48px;
	}
}

/* Home first screen without the portrait (migration 070): one text column
   kept to a readable width, a lower band (phones keep min-height: 0). */
@media (min-width: 768px) {
	body .elementor-section.kg-hero--text > .elementor-container {
		min-height: min(520px, calc(100vh - var(--kg-header-h)));
	}
}

body .kg-hero--text .kg-hero__copy > .elementor-widget-wrap {
	max-width: 900px;
}

/* «Методист школы» on the home page (migration 070): modest photo + short text. */
body .elementor-section.kg-methodist + .kg-certs {
	padding-top: 0;
}

/* The whole 4:5 portrait, not a square crop of it (owner's wish of 2026-10-28). */
body .kg-sec.kg-methodist .kg-methodist__photo img {
	max-width: 300px;
	aspect-ratio: 4 / 5;
	object-position: center top;
}

@media (max-width: 767px) {
	body .kg-sec.kg-methodist .kg-methodist__photo img {
		max-width: 220px;
	}
}

/* Course and hub pages (Kadence "full width", ~70 pages incl. the 30 course
   pages): their H1 sits alone in a text-editor near the top, often followed
   by a grey italic subtitle in the next section. Without touching their
   content, that H1 section (+ the empty spacer before it and the subtitle
   after it) becomes a navy page header in the prototype style. Only "clean"
   sections qualify: anything with lists, media, tables or buttons stays as is. */
body.page.content-width-fullwidth .entry-content > .elementor > .elementor-top-section:has(.elementor-widget-text-editor h1):not(:has(h2, h3, ul, ol, img, iframe, table, .elementor-widget-button, .elementor-widget-image, .elementor-widget-video, .elementor-widget-shortcode)),
body.page.content-width-fullwidth .entry-content > .elementor > .elementor-top-section:not(:has(.elementor-widget)):has(+ .elementor-top-section .elementor-widget-text-editor h1),
body.page.content-width-fullwidth .entry-content > .elementor > .elementor-top-section:has(.elementor-widget-text-editor h1) + .elementor-top-section:has(em, [style*="808080"]):not(:has(h1, h2, h3, ul, ol, img, iframe, table, .elementor-widget-button, .elementor-widget-image, .elementor-widget-video, .elementor-widget-shortcode)) {
	--kg-ph: 1;
	margin: 0;
	padding-top: 0;
	padding-bottom: 0;
	background:
		radial-gradient(ellipse at 15% 0%, rgba(101, 115, 123, .15), transparent 60%),
		linear-gradient(125deg, #1e3445, #122433) fixed;
}

/* Spacing inside the band */
body.page.content-width-fullwidth .entry-content > .elementor > .elementor-top-section:has(.elementor-widget-text-editor h1):not(:has(h2, h3, ul, ol, img, iframe, table, .elementor-widget-button, .elementor-widget-image, .elementor-widget-video, .elementor-widget-shortcode)) {
	padding-top: clamp(44px, 5vw, 72px);
	padding-bottom: clamp(36px, 4.5vw, 64px);
}

body.page.content-width-fullwidth .entry-content > .elementor > .elementor-top-section:has(.elementor-widget-text-editor h1):not(:has(h2, h3, ul, ol, img, iframe, table, .elementor-widget-button, .elementor-widget-image, .elementor-widget-video, .elementor-widget-shortcode)):has(+ .elementor-top-section em, + .elementor-top-section [style*="808080"]) {
	padding-bottom: 0;
}

body.page.content-width-fullwidth .entry-content > .elementor > .elementor-top-section:has(.elementor-widget-text-editor h1) + .elementor-top-section:has(em, [style*="808080"]):not(:has(h1, h2, h3, ul, ol, img, iframe, table, .elementor-widget-button, .elementor-widget-image, .elementor-widget-video, .elementor-widget-shortcode)) {
	padding-bottom: clamp(40px, 5vw, 68px);
	margin-bottom: clamp(24px, 3vw, 40px);
}

/* Type inside the band */
body.page.content-width-fullwidth .entry-content > .elementor > .elementor-top-section:has(.elementor-widget-text-editor h1):not(:has(h2, h3, ul, ol, img, iframe, table, .elementor-widget-button, .elementor-widget-image, .elementor-widget-video, .elementor-widget-shortcode)) .elementor-widget-text-editor h1 {
	margin: 0;
	color: #fff !important;
	font: 700 clamp(34px, 3.8vw, 56px)/1.1 var(--kg-font-display);
	letter-spacing: -.04em;
}

body.page.content-width-fullwidth .entry-content > .elementor > .elementor-top-section:has(.elementor-widget-text-editor h1):not(:has(h2, h3, ul, ol, img, iframe, table, .elementor-widget-button, .elementor-widget-image, .elementor-widget-video, .elementor-widget-shortcode)) .elementor-widget-text-editor h1 :is(span, strong, b, em, i, font, u) {
	font-weight: 400 !important;
}

body.page.content-width-fullwidth .entry-content > .elementor > .elementor-top-section:has(.elementor-widget-text-editor h1) + .elementor-top-section:has(em, [style*="808080"]):not(:has(h1, h2, h3, ul, ol, img, iframe, table, .elementor-widget-button, .elementor-widget-image, .elementor-widget-video, .elementor-widget-shortcode)) .elementor-widget-text-editor,
body.page.content-width-fullwidth .entry-content > .elementor > .elementor-top-section:has(.elementor-widget-text-editor h1) + .elementor-top-section:has(em, [style*="808080"]):not(:has(h1, h2, h3, ul, ol, img, iframe, table, .elementor-widget-button, .elementor-widget-image, .elementor-widget-video, .elementor-widget-shortcode)) .elementor-widget-text-editor [style*="color"] {
	color: #c4d0d5 !important;
	font-size: 18px;
}

/* Signed-in header link (plugin filter kigetss_account_label): avatar + name */
.kg-account {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	max-width: 190px;
}

.kg-account__avatar {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--kg-paper);
	color: var(--kg-navy);
	transition: background .2s;
}

.kg-account:hover .kg-account__avatar {
	background: #e2ddd2;
}

.kg-account__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@media (max-width: 479.98px) {
	/* keep the avatar on phones (the plain «Войти» link is hidden there) */
	.kg-header__actions .kg-header__login.kg-account {
		display: inline-flex;
		padding: 6px 2px;
	}

	.kg-account__name {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}
}

/* Teachers shortcode inside a landing section */
body .kg-sec .kg-teachers {
	width: 100%;
}

/* Compact light page heading (title + one-line lead) instead of the tall
   navy hero, where the content itself should be on the first screen. */
body .elementor-section.kg-pagehead {
	padding-top: clamp(40px, 5vw, 72px);
}

/* /teachers/ (migration 088): the methodist's tall portrait leads the page. */
body .kg-sec .kg-portrait--tall img {
	max-width: 320px;
	aspect-ratio: 4 / 5;
	object-position: center top;
}

body .elementor-section.kg-pagehead {
	padding-bottom: clamp(32px, 4vw, 56px);
}

/* The methodist block and «Как методист ведёт команду» share one grid
   (320px column + 64px gap), so their text starts at the same line. Her
   portrait is a close selfie: at 320px her face is near the team's scale. */
@media (min-width: 1024px) {
	body .elementor-section:is(.kg-teachers-lead, .kg-teachers-how) > .elementor-container {
		gap: 64px;
	}

	body .elementor-section:is(.kg-teachers-lead, .kg-teachers-how) > .elementor-container > .elementor-column:first-child {
		flex: 0 0 320px;
		width: 320px !important;
	}

	body .elementor-section:is(.kg-teachers-lead, .kg-teachers-how) > .elementor-container > .elementor-column:last-child {
		flex: 1 1 auto;
		width: auto !important;
	}
}

body .kg-teachers-lead .kg-body > .elementor-widget-container {
	max-width: 62ch;
}

body .kg-teachers-lead .kg-body blockquote {
	margin: 1.4em 0;
	background: #fffdf8;
}

/* Small outline labels (exam names) inside a text widget. */
body .kg-sec .elementor-widget-text-editor ul.kg-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

body .kg-sec .elementor-widget-text-editor ul.kg-chips li {
	margin: 0;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.4;
}

body .kg-sec .elementor-widget-text-editor ul.kg-chips :is(li:not(:has(a)), a) {
	display: block;
	padding: 5px 12px;
	border: 1px solid var(--kg-line);
	border-radius: 999px;
	background: #fffdf8;
	color: var(--kg-navy);
	text-decoration: none;
	transition: border-color .2s, color .2s;
}

body .kg-sec .elementor-widget-text-editor ul.kg-chips a:is(:hover, :focus-visible) {
	border-color: var(--kg-copper);
	color: var(--kg-copper-text);
}

body .kg-teachers-how .kg-steps ol {
	max-width: 640px;
}

/* Phones: a small portrait beside «Методист школы» and her name, the rest
   of the block full width below (the text column's widgets join the grid). */
@media (max-width: 767px) {
	body .elementor-section.kg-teachers-lead > .elementor-container {
		display: grid;
		grid-template-columns: 112px minmax(0, 1fr);
		column-gap: 18px;
		row-gap: 0;
	}

	body .elementor-section.kg-teachers-lead > .elementor-container > .elementor-column:last-child,
	body .elementor-section.kg-teachers-lead > .elementor-container > .elementor-column:last-child > .elementor-widget-wrap {
		display: contents;
	}

	body .elementor-section.kg-teachers-lead > .elementor-container > .elementor-column:first-child {
		grid-column: 1;
		grid-row: 1 / span 2;
		align-self: center;
		width: auto !important;
	}

	body .kg-teachers-lead .elementor-column:last-child .elementor-widget {
		grid-column: 1 / -1;
	}

	body .kg-teachers-lead .elementor-column:last-child .elementor-widget:nth-child(1) {
		grid-column: 2;
		align-self: end;
		margin-bottom: 8px;
	}

	body .kg-teachers-lead .elementor-column:last-child .elementor-widget:nth-child(2) {
		grid-column: 2;
		align-self: start;
	}

	body .kg-teachers-lead .elementor-column:last-child .elementor-widget:nth-child(3) {
		margin-top: 22px;
	}

	body .kg-teachers-lead .kg-display--sm .elementor-heading-title {
		font-size: 28px !important;
	}

	body .kg-sec .kg-portrait--tall img {
		max-width: 112px;
	}
}

/* Decorative classroom panorama; the generated photo adds no page content. */
body.home .kg-hero--mosaic:not(.kg-hero--harbour) .kg-hero__copy > .elementor-widget-wrap::before {
	content: "";
	display: block;
	flex: 0 0 100%;
	width: 100%;
	aspect-ratio: 3 / 1;
	margin-bottom: clamp(24px, 2.5vw, 36px);
	border-radius: 14px;
	background: url('../images/classroom-panorama.webp') center / cover no-repeat;
	box-shadow: 0 16px 40px rgba(7, 21, 34, .18);
	pointer-events: none;
}

/* Safe-harbour message is editable HTML; the original programme text stays below it. */
.kg-anime-empty { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; align-items: center; padding: clamp(20px, 4vw, 48px); background: var(--kg-paper); border-radius: 16px; }
.kg-anime-empty > img { width: 100%; height: auto; border-radius: 12px; }
.kg-anime-empty__links { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 767px) { .kg-anime-empty { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

body .kg-hero-reassurance { width: 100%; margin: 4px 0 22px; }
body .kg-harbour { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); align-items: center; gap: 16px; }
body .kg-harbour__message { margin: 0; font-family: var(--kg-font-display); font-size: clamp(22px, 2.1vw, 30px); line-height: 1.3; color: var(--kg-cream); }
body .kg-harbour__message em { color: var(--kg-copper); }
body .kg-harbour img { display: block; width: 100%; height: auto; border-radius: 14px; }
@media (max-width: 767px) {
 body .kg-harbour { grid-template-columns: minmax(0, 1fr); gap: 14px; }
 body .kg-harbour__message { font-size: 24px; }
 body .kg-harbour img { max-width: 460px; margin-inline: auto; }
}

/* Home page concept (migration 075) ------------------------------------------
   First screen with a mosaic of typographic material tiles, «Как мы учим»
   steps, grammar points, the level ladder and static skill cards. Lists are
   plain <ul>/<ol> in text-editor widgets, so the owner edits them as text. */

/* Two navy sections in a row (a heading row and its content, the method
   block and its methods list) read as one band: the gradient is laid out
   against the viewport, so the second one does not restart it with a seam. */
body .elementor-section.kg-band-navy:has(+ .kg-band-navy),
body .elementor-section.kg-band-navy + .kg-band-navy {
	background-attachment: fixed;
}

/* Sections end on fractional pixels; on scaled screens (125 %) the light page
   background showed through as a hairline between two dark ones. A 2px
   overlap hides it (1px was not enough at that scale). */
body .elementor-section.kg-band-navy + .kg-band-navy,
body .elementor-section.kg-sec--paper + .kg-sec--paper,
body .elementor-section.kg-sec--sand + .kg-sec--sand {
	margin-top: -2px;
}

/* First screen: copy + mosaic */
body .kg-hero--mosaic .elementor-widget-heading.kg-display--hero .elementor-heading-title {
	font-size: clamp(40px, 4.4vw, 66px) !important;
}

body .kg-sec .kg-mosaic ul {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

body .kg-sec .kg-mosaic li {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-height: 150px;
	margin: 0;
	padding: 22px 20px 18px;
	box-sizing: border-box;
	background: rgba(255, 255, 255, .045);
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: var(--kg-radius);
	color: #afbdc5;
	font-size: 13.5px;
	line-height: 1.5;
	transition: transform .3s var(--kg-ease), background-color .3s, border-color .3s;
}

/* short copper rule, as on the cards */
body .kg-sec .kg-mosaic li::before {
	content: "";
	position: absolute;
	top: -1px;
	left: 20px;
	width: 28px;
	height: 3px;
	border-radius: 0 0 2px 2px;
	background: var(--kg-copper);
}

body .kg-sec .kg-mosaic .kg-tile__type {
	padding-right: 22px;
	color: #d9aa90;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: .14em;
	line-height: 1.5;
	text-transform: uppercase;
}

body .kg-sec .kg-mosaic li strong {
	color: #fff;
	font: 700 20px/1.2 var(--kg-font-display);
	letter-spacing: -.01em;
}

body .kg-band-navy .kg-mosaic.elementor-widget-text-editor li strong a {
	color: inherit;
	text-decoration: none;
}

/* the whole tile is the link */
body .kg-sec .kg-mosaic li strong a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

body .kg-sec .kg-mosaic .kg-tile__text {
	margin-top: auto;
	padding-top: 6px;
}

body .kg-sec .kg-mosaic li:has(a)::after {
	content: "↗";
	position: absolute;
	top: 16px;
	right: 16px;
	color: rgba(255, 255, 255, .45);
	font-size: 15px;
	line-height: 1;
	transition: color .2s, translate .2s;
}

body .kg-sec .kg-mosaic li:has(a):hover {
	background: rgba(255, 255, 255, .08);
	border-color: rgba(214, 155, 125, .6);
	transform: translateY(-3px);
}

body .kg-sec .kg-mosaic li:has(a):hover::after {
	color: #d69b7d;
	translate: 2px -2px;
}

body .kg-sec .kg-mosaic li:has(a:focus-visible) {
	outline: 3px solid var(--kg-copper);
	outline-offset: 3px;
}

body .kg-sec .kg-mosaic li a:focus-visible {
	outline: none;
}

/* Desktop: the right column of tiles is offset, like a mosaic. */
@media (min-width: 1025px) {
	body .kg-sec .kg-mosaic ul {
		padding-bottom: 28px;
	}

	body .kg-sec .kg-mosaic li:nth-child(even) {
		translate: 0 28px;
	}
}

/* Tablets: mosaic under the copy, three tiles per row. */
@media (max-width: 1024px) {
	body .elementor-section.kg-sec.kg-hero--mosaic > .elementor-container {
		flex-wrap: wrap;
		min-height: 0;
	}

	body .kg-hero--mosaic > .elementor-container > .elementor-column {
		width: 100% !important;
	}

	body .kg-sec .kg-mosaic ul {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Phones: two tiles per row. */
@media (max-width: 767px) {
	body .kg-sec .kg-mosaic ul {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	body .kg-sec .kg-mosaic li {
		min-height: 0;
		padding: 18px 14px 14px;
		font-size: 13px;
	}

	body .kg-sec .kg-mosaic li::before {
		left: 14px;
	}

	body .kg-sec .kg-mosaic .kg-tile__type {
		padding-right: 16px;
		font-size: 10px;
		letter-spacing: .1em;
	}

	body .kg-sec .kg-mosaic li strong {
		font-size: 17px;
	}

	body .kg-sec .kg-mosaic li:has(a)::after {
		top: 13px;
		right: 11px;
		font-size: 13px;
	}
}

/* «Как мы учим»: four steps in a row with a connecting line */
body .kg-sec .kg-flow ol {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0 28px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: kg-flow;
}

body .kg-sec .kg-flow li {
	position: relative;
	margin: 0;
	padding: 66px 0 0;
	color: #5f6870;
	font-size: 15px;
	line-height: 1.7;
	counter-increment: kg-flow;
}

body .kg-sec .kg-flow li::before {
	content: counter(kg-flow, decimal-leading-zero);
	position: absolute;
	top: 0;
	left: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 43px;
	height: 43px;
	box-sizing: border-box;
	border: 1px solid rgba(185, 124, 96, .55);
	border-radius: 50%;
	background: var(--kg-cream);
	color: #a76f54;
	font: 700 18px/1 var(--kg-font-display);
}

body .kg-sec .kg-flow li:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 21px;
	left: 55px;
	right: -16px;
	height: 1px;
	background: var(--kg-line);
}

body .kg-sec .kg-flow li strong {
	display: block;
	margin-bottom: 8px;
	color: var(--kg-navy);
	font: 700 23px/1.25 var(--kg-font-display);
	letter-spacing: -.015em;
}

body .kg-sec .elementor-widget.kg-closing {
	margin-top: 44px;
}

body .kg-sec .kg-closing .elementor-widget-container > p {
	max-width: 720px;
	margin: 0;
	padding-left: 18px;
	border-left: 2px solid var(--kg-copper);
	color: var(--kg-navy);
	font: 700 clamp(20px, 1.8vw, 24px)/1.4 var(--kg-font-display);
	letter-spacing: -.01em;
}

@media (max-width: 1024px) {
	body .kg-sec .kg-flow ol {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 36px 28px;
	}

	body .kg-sec .kg-flow li:nth-child(2n)::after {
		display: none;
	}
}

@media (max-width: 767px) {
	body .kg-sec .kg-flow ol {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}

	body .kg-sec .kg-flow li {
		padding: 22px 0 24px 58px;
		border-top: 1px solid var(--kg-line);
	}

	body .kg-sec .kg-flow li:last-child {
		border-bottom: 1px solid var(--kg-line);
	}

	body .kg-sec .kg-flow li::before {
		top: 20px;
	}

	body .kg-sec .kg-flow li:not(:last-child)::after {
		display: none;
	}

	body .kg-sec .kg-flow li strong {
		font-size: 21px;
	}

	body .kg-sec .elementor-widget.kg-closing {
		margin-top: 32px;
	}
}

/* Grammar: points as rows, title beside its line on wider screens */
body .kg-sec .kg-points ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

body .kg-sec .kg-points li {
	margin: 0;
	padding: 22px 0 24px;
	border-top: 1px solid var(--kg-line);
	color: #5f6870;
	font-size: 15px;
	line-height: 1.7;
}

body .kg-sec .kg-points li:last-child {
	border-bottom: 1px solid var(--kg-line);
}

body .kg-sec .kg-points li strong {
	display: block;
	margin-bottom: 6px;
	color: var(--kg-navy);
	font: 700 23px/1.25 var(--kg-font-display);
	letter-spacing: -.015em;
}

@media (min-width: 768px) {
	body .kg-sec .kg-points li {
		display: grid;
		grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
		gap: 28px;
		align-items: baseline;
	}

	body .kg-sec .kg-points li strong {
		margin: 0;
	}
}

@media (max-width: 767px) {
	body .kg-sec .kg-points li strong {
		font-size: 21px;
	}
}

/* Levels: a ladder A1 → C1 (bottoms aligned, each step higher) */
body .kg-sec .kg-ladder ol {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 12px;
	align-items: end;
	margin: 0;
	padding: 0 0 0;
	list-style: none;
	border-bottom: 1px solid rgba(255, 255, 255, .22);
}

body .kg-sec .kg-ladder li {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	padding: 22px 20px 20px;
	box-sizing: border-box;
	background: rgba(255, 255, 255, .045);
	border: 1px solid rgba(255, 255, 255, .12);
	border-bottom: 0;
	border-radius: var(--kg-radius) var(--kg-radius) 0 0;
	color: #c5d0d6;
	font-size: 14px;
	line-height: 1.5;
}

body .kg-sec .kg-ladder li:nth-child(1) { min-height: 160px; }
body .kg-sec .kg-ladder li:nth-child(2) { min-height: 190px; }
body .kg-sec .kg-ladder li:nth-child(3) { min-height: 220px; }
body .kg-sec .kg-ladder li:nth-child(4) { min-height: 250px; }
body .kg-sec .kg-ladder li:nth-child(5) { min-height: 280px; }

body .kg-sec .kg-ladder li strong {
	color: #fff;
	font: 700 46px/1 var(--kg-font-display);
	letter-spacing: -.04em;
}

body .kg-sec .kg-ladder li em {
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid rgba(23, 40, 56, .14);
	font-size: 13px;
	font-style: normal;
	font-weight: 700;
	line-height: 1.45;
}

/* B1: the step from which university preparation starts */
body .kg-sec .kg-ladder li.is-key {
	background: var(--kg-cream);
	border-color: var(--kg-cream);
	color: var(--kg-navy);
}

body .kg-band-navy .kg-ladder.elementor-widget-text-editor li.is-key strong {
	color: var(--kg-navy);
}

body .kg-sec .kg-ladder li.is-key em {
	color: var(--kg-copper-text);
}

body .kg-sec .elementor-widget.kg-ladder__after {
	margin-top: 36px;
}

@media (max-width: 1024px) {
	body .kg-sec .kg-ladder ol {
		grid-template-columns: minmax(0, 1fr);
		gap: 8px;
		border-bottom: 0;
	}

	body .kg-sec .kg-ladder li,
	body .kg-sec .kg-ladder li:nth-child(n) {
		display: grid;
		grid-template-columns: 64px minmax(0, 1fr);
		gap: 2px 16px;
		align-items: center;
		min-height: 0;
		padding: 16px 18px;
		border-bottom: 1px solid rgba(255, 255, 255, .12);
		border-radius: var(--kg-radius-sm);
	}

	body .kg-sec .kg-ladder li strong {
		font-size: 38px;
	}

	body .kg-sec .kg-ladder li:is(.is-key, :has(> em)) strong {
		grid-row: span 2;
	}

	body .kg-sec .kg-ladder li em {
		grid-column: 2;
		margin: 0;
		padding-top: 6px;
	}
}

/* Skills: cards without a link do not move on hover */
body .kg-card--static:hover > .elementor-widget-wrap {
	transform: none;
	border-color: var(--kg-card-line);
	box-shadow: var(--kg-shadow-soft);
}

body .kg-card--static:is(:hover, :focus-within) > .elementor-widget-wrap::before {
	transform: scaleX(.16);
}

body .kg-sec .kg-card--static .elementor-widget.kg-card__title {
	margin-top: 18px;
}

/* Final call to action: one column */
body .kg-cta-final .kg-cta__copy > .elementor-widget-wrap {
	max-width: 760px;
}

/* Reading pages share the landing palette without changing lesson markup. */
@media (min-width: 1025px) {
	body.kg-theme.single-post.has-left-sidebar .content-container {
		grid-template-columns: 260px minmax(0, 1fr);
		gap: 36px;
	}
	body.kg-theme.single-post .entry-content-wrap {
		padding: 32px;
	}
}

body.single-post .single-content :is(.elementor-widget-text-editor, .elementor-widget-heading) :is(h1, h2, h3) {
	font-family: var(--kg-font-display) !important;
	font-weight: 700;
	line-height: 1.25;
}

/* Only an isolated opening title gets a cover; mixed content stays readable. */
body.single-post .single-content > .elementor > .elementor-top-section:first-child :is(.elementor-widget-heading, .elementor-widget-text-editor):has(h1, h2, h3):not(:has(p, ul, ol, img, iframe)) {
	padding: clamp(24px, 3vw, 42px);
	border-radius: 14px;
	background: radial-gradient(ellipse at 100% 0, #354a50 0, transparent 65%), var(--kg-navy);
	box-shadow: 0 12px 28px rgba(23, 40, 56, .08);
}

body.single-post .single-content > .elementor > .elementor-top-section:first-child :is(.elementor-widget-heading, .elementor-widget-text-editor):has(h1, h2, h3):not(:has(p, ul, ol, img, iframe)) :is(h1, h2, h3) {
	margin: 0;
	color: var(--kg-card) !important;
	font-size: clamp(28px, 3vw, 44px) !important;
	font-weight: 700 !important;
	text-align: left !important;
	text-wrap: pretty;
}

/* Titles pasted with inline colour and size (black spans) stay light on the dark cover. */
body.single-post .single-content > .elementor > .elementor-top-section:first-child :is(.elementor-widget-heading, .elementor-widget-text-editor):has(h1, h2, h3):not(:has(p, ul, ol, img, iframe)) :is(h1, h2, h3) * {
	color: inherit !important;
	font-size: inherit !important;
}

body.single-post .single-content > .elementor > .elementor-top-section:first-child :is(.elementor-widget-heading, .elementor-widget-text-editor):has(h1, h2, h3):not(:has(p, ul, ol, img, iframe)) :is(h1, h2, h3)::before {
	content: '';
	display: block;
	width: 36px;
	height: 3px;
	margin-bottom: 22px;
	background: var(--kg-copper);
}

/* The theme's title for posts whose content has none: the same cover as an opening title. */
body.single-post .kg-post-title {
	margin: 0 0 28px;
	padding: clamp(24px, 3vw, 42px);
	border-radius: 14px;
	background: radial-gradient(ellipse at 100% 0, #354a50 0, transparent 65%), var(--kg-navy);
	box-shadow: 0 12px 28px rgba(23, 40, 56, .08);
	color: var(--kg-card);
	font: 700 clamp(28px, 3vw, 44px)/1.25 var(--kg-font-display);
	text-wrap: pretty;
}

body.single-post .kg-post-title::before {
	content: '';
	display: block;
	width: 36px;
	height: 3px;
	margin-bottom: 22px;
	background: var(--kg-copper);
}

body.single-post .kg-post-meta {
	gap: 8px 12px;
	margin-bottom: 18px;
	font-size: 12px;
}

body.single-post .single-content .elementor-widget-text-editor :is(h2, h3) {
	font-size: clamp(23px, 2vw, 30px);
	padding-bottom: 14px;
	border-bottom: 1px solid var(--kg-card-line);
	text-wrap: pretty;
}

/* Vocabulary with examples: preserve real list numbering, including start. */
body.single-post .single-content .elementor-widget-text-editor ol > li:has(> blockquote) {
	margin-block: 22px;
	padding: 22px;
	border: 1px solid var(--kg-card-line);
	border-radius: 12px;
	background: #f7f5ef;
}

body.single-post .single-content .elementor-widget-text-editor blockquote {
	margin: 18px 0;
	padding: 18px 22px;
	border-left: 3px solid var(--kg-copper);
	border-radius: 0 10px 10px 0;
	background: #edf0e9;
	font-style: normal;
}

body.single-post .single-content .elementor-accordion .elementor-accordion-item {
	margin-bottom: 12px;
	border: 1px solid var(--kg-card-line) !important;
	border-radius: 12px;
	overflow: hidden;
}

body.single-post .single-content .elementor-accordion .elementor-tab-title {
	padding: 20px 24px !important;
	background: var(--kg-paper) !important;
}

body.single-post .single-content .elementor-accordion .elementor-tab-content {
	padding: 24px !important;
}

body.kg-theme.single-post .primary-sidebar .textwidget :is(p, h2, h3, h4) {
	font: 400 14px/1.7 var(--kg-font-body);
	color: var(--kg-muted);
}

body.kg-theme.single-post .primary-sidebar.widget-area .widget {
	padding: 22px;
	box-shadow: none;
}

@media (max-width: 767px) {
	body.kg-theme.single-post .entry-content-wrap { padding: 18px 10px; }
	body.single-post .single-content .elementor-widget-text-editor ol > li:has(> blockquote) { padding: 14px; }
	body.single-post .single-content .elementor-widget-text-editor blockquote { padding: 14px; }
	body.single-post .single-content .elementor-accordion .elementor-tab-content { padding: 18px !important; }
}

/* Decorative artwork keeps the homepage editable in Elementor. */
body .kg-sec .kg-mosaic li::before {
	position: relative;
	top: auto;
	left: auto;
	display: block;
	flex: 0 0 96px;
	width: calc(100% + 40px);
	height: 96px;
	margin: -22px -20px 10px;
	border-radius: 11px 11px 0 0;
	background-image: var(--kg-story-image);
	background-color: #dce4dc;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	pointer-events: none;
}

/* Stills and publicity photos, with focal positions for the wide tile format. Sources: images/stories-media-sources.json. */
body .kg-sec .kg-mosaic li:nth-child(1)::before { --kg-story-image: url('../images/stories-cartoon-ben-holly.jpg'); background-position: center 40%; }
body .kg-sec .kg-mosaic li:nth-child(2)::before { --kg-story-image: url('../images/stories-anime-howl.webp'); background-position: center 24%; }
body .kg-sec .kg-mosaic li:nth-child(3)::before { --kg-story-image: url('../images/stories-cinema-gifted-hands.webp'); background-position: center 15%; }
body .kg-sec .kg-mosaic li:nth-child(4)::before { --kg-story-image: url('../images/stories-series-friends.webp'); background-position: center 35%; }
body .kg-sec .kg-mosaic li:nth-child(5)::before { --kg-story-image: url('../images/stories-tales-wolfwalkers.webp'); background-position: center 35%; }
body .kg-sec .kg-mosaic li:nth-child(6)::before { --kg-story-image: url('../images/stories-bbc-podcast.webp'); background-position: center 35%; }
/* Since 084 the tiles carry their kind, so the order can change without moving the pictures. */
body .kg-sec .kg-mosaic li.kg-tile--cartoons::before { --kg-story-image: url('../images/stories-cartoon-ben-holly.jpg'); background-position: center 40%; }
body .kg-sec .kg-mosaic li.kg-tile--anime::before { --kg-story-image: url('../images/stories-anime-howl.webp'); background-position: center 24%; }
body .kg-sec .kg-mosaic li.kg-tile--cinema::before { --kg-story-image: url('../images/stories-cinema-gifted-hands.webp'); background-position: center 15%; }
body .kg-sec .kg-mosaic li.kg-tile--series::before { --kg-story-image: url('../images/stories-series-friends.webp'); background-position: center 35%; }
body .kg-sec .kg-mosaic li.kg-tile--tales::before { --kg-story-image: url('../images/stories-tales-wolfwalkers.webp'); background-position: center 35%; }
body .kg-sec .kg-mosaic li.kg-tile--podcasts::before { --kg-story-image: url('../images/stories-bbc-podcast.webp'); background-position: center 35%; }

body .kg-sec .kg-mosaic li:has(a)::after {
	top: 10px;
	right: 10px;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #172838;
	color: #fffdf8;
	pointer-events: none;
}

body .kg-skills .kg-card__title::before {
	content: '';
	display: block;
	width: 50px;
	height: 50px;
	margin-bottom: 22px;
	border: 1px solid #dce0d6;
	border-radius: 14px;
	background: #edf0e9 center / 27px no-repeat;
	pointer-events: none;
}

body .kg-skills .kg-card:nth-child(1) .kg-card__title::before { background-image: url('../images/icon-listen.svg'); }
body .kg-skills .kg-card:nth-child(2) .kg-card__title::before { background-image: url('../images/icon-speak.svg'); }
body .kg-skills .kg-card:nth-child(3) .kg-card__title::before { background-image: url('../images/icon-read.svg'); }
body .kg-skills .kg-card:nth-child(4) .kg-card__title::before { background-image: url('../images/icon-write.svg'); }

body .kg-cards .kg-card__label {
	display: flex;
	align-items: center;
	gap: 10px;
}

body .kg-cards .kg-card__label::before {
	content: '';
	display: inline-block;
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
	border-radius: 10px;
	vertical-align: middle;
	background: #eee8de center / 22px no-repeat;
	pointer-events: none;
}

body .kg-cards .kg-card:nth-child(1) .kg-card__label::before { background-image: url('../images/icon-read.svg'); }
body .kg-cards .kg-card:nth-child(2) .kg-card__label::before { background-image: url('../images/icon-work.svg'); }
body .kg-cards .kg-card:nth-child(3) .kg-card__label::before { background-image: url('../images/icon-graduate.svg'); }
body .kg-cards .kg-card:nth-child(4) .kg-card__label::before { background-image: url('../images/icon-spark.svg'); }
body .kg-cards .kg-card:nth-child(5) .kg-card__label::before { background-image: url('../images/icon-award.svg'); }
body .kg-cards .kg-card:nth-child(6) .kg-card__label::before { background-image: url('../images/icon-work.svg'); }

@media (max-width: 767px) {
	body .kg-sec .kg-mosaic li::before {
		flex-basis: 80px;
		width: calc(100% + 28px);
		height: 80px;
		margin: -18px -14px 8px;
	}
}

/* Lead board: aligned lanes and a shared two-line heading baseline. */
body.kg-theme .kga .kga-kanban {
	align-items: stretch;
	gap: 12px;
}
body.kg-theme .kga .kga-kcol {
	display: flex;
	flex-direction: column;
	min-height: 240px;
	padding: 12px;
}
body.kg-theme .kga.kga .kga-kcol-head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: start;
	min-height: 2.8em;
	margin: 0 0 12px;
	line-height: 1.4;
}
body.kg-theme .kga .kga-kcol-head .kga-badge {
	align-self: start;
	min-width: 24px;
	text-align: center;
}
body.kg-theme .kga .kga-kcol-list {
	align-content: start;
	gap: 10px;
}
body.kg-theme .kga .kga-kcol-empty {
	display: grid;
	place-items: center;
	min-height: 80px;
	padding: 12px 4px;
}
body.kg-theme .kga .kga-lead-tools {
	gap: 12px 24px;
	margin: 20px 0 16px;
	align-items: flex-end;
}
body.kg-theme .kga .kga-lead-tools .kga-search { margin-bottom: 0; }
body.kg-theme .kga .kga-lead-tools .kga-check {
	display: flex;
	align-items: center;
	min-height: 44px;
	margin: 0;
}

/* Editorial details: category icons, study artwork and compact mobile content. */
.kg-post-card { --kg-category-icon: url('../images/icon-read.svg'); min-height: 220px; }
.kg-post-card--icon-write { --kg-category-icon: url('../images/icon-write.svg'); }
.kg-post-card--icon-spark { --kg-category-icon: url('../images/icon-spark.svg'); }
.kg-post-card--icon-listen { --kg-category-icon: url('../images/icon-listen.svg'); }
.kg-post-card--icon-speak { --kg-category-icon: url('../images/icon-speak.svg'); }
.kg-post-card--icon-award { --kg-category-icon: url('../images/icon-award.svg'); }
.kg-post-card--icon-work { --kg-category-icon: url('../images/icon-work.svg'); }
.kg-post-card::after {
	content: '';
	position: absolute;
	top: 18px;
	right: 18px;
	width: 30px;
	height: 30px;
	border-radius: 8px;
	background: var(--kg-paper) var(--kg-category-icon) center / 22px no-repeat;
	pointer-events: none;
}
.kg-post-card__label { padding-right: 34px; min-height: 24px; }
body.kg-theme .kg-post-card__title { min-height: 3.9em; overflow-wrap: anywhere; }
body.kg-theme .kg-post-card__title:first-child { padding-right: 34px; }
body.kg-archive #archive-container, .kg-card-grid { align-items: stretch; }

body.home .kg-grammar > .elementor-container > .elementor-column:first-child > .elementor-widget-wrap::after {
	content: '';
	display: block;
	width: 100%;
	max-width: 440px;
	aspect-ratio: 640 / 260;
	margin-top: 24px;
	border-radius: 16px;
	background: url('../images/grammar-study.svg') center / contain no-repeat;
	pointer-events: none;
}
body .kg-certs .kg-cert__caption {
	margin: 12px 0 0;
	color: var(--kg-muted);
	font: 400 12px/1.5 var(--kg-font-body);
	text-align: center;
}

body.kg-theme .kga-dlg-catalog {
	padding: clamp(18px, 3vw, 32px);
	border: 1px solid var(--kg-card-line);
	border-radius: 16px;
	background: var(--kg-paper);
	margin-bottom: 40px;
}
body.kg-theme .kga-dlg-catalog ~ .kga-dlg { margin-top: 40px; }

.kg-course-details > summary {
	padding: 14px 0;
	color: var(--kg-navy);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}
.kg-course-details > summary::marker { color: var(--kg-copper-text); }
.kg-course-details > summary:focus-visible { outline: 2px solid var(--kg-copper-text); outline-offset: 4px; }

@media (max-width: 767px) {
	body.home .kg-grammar > .elementor-container > .elementor-column:first-child > .elementor-widget-wrap::after { display: none; }
	body .kg-sec .kg-ladder li,
	body .kg-sec .kg-ladder li:nth-child(n) {
		grid-template-columns: 32px minmax(0, 1fr);
		gap: 2px 8px;
		padding: 10px 12px;
		min-height: 0;
		font-size: 13px;
	}
	body .kg-sec .kg-ladder li strong { font-size: 21px; letter-spacing: -.02em; }
	body .kg-sec .kg-ladder li strong::after { content: ' ·'; font: 400 13px var(--kg-font-body); }
	body .kg-sec .kg-ladder li:is(.is-key, :has(> em)) strong { grid-row: 1; }
	body .kg-sec .kg-ladder li em { grid-column: 1 / -1; margin-top: 6px; padding-top: 8px; font-size: 12px; }
	body .elementor-section.kg-sec--methods { padding-top: 20px; padding-bottom: 28px; }
	body .kg-sec--methods .kg-method-list ul { grid-template-columns: minmax(0, 1fr); }
	body .kg-sec--methods .kg-method-list li { padding: 10px 0 12px; }
	body.single-post .single-content > .elementor > .elementor-top-section:first-child :is(.elementor-widget-heading, .elementor-widget-text-editor):has(h1, h2, h3):not(:has(p, ul, ol, img, iframe)) :is(h1, h2, h3) {
		font-size: clamp(22px, 6vw, 34px) !important;
	}
}

.kg-bbc-credit { display: inline-block; margin-top: 8px; font-size: 11px; color: inherit; opacity: .7; }
.kga-home-practice { margin-top: 22px; padding: 22px; border: 1px solid #d5b5a2; border-radius: 12px; background: #f7f0e8; }
.kga-home-practice p { margin: 12px 0 0; font-size: 14px; color: var(--kg-muted); }

/* Homepage learning stories: generated editorial photos and pencil accents. */
body.home .elementor-section.kg-learning-feature > .elementor-container {
	align-items: center;
}

body.home .kg-learning-feature .kg-intro,
body.home .kg-learning-feature .kg-lead {
	max-width: 590px;
	margin-top: 8px;
}

body.home .kg-learning-feature .kg-pencil-emphasis {
	font-weight: 600;
	background: url('../images/pencil-underline.svg') left bottom / 100% 9px no-repeat;
	padding-bottom: 7px;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

body.home .kg-learning-feature img.kg-learning-photo {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(17, 32, 46, .10);
}

body.home .kg-how img.kg-learning-photo {
	max-width: 420px;
	margin-left: auto;
}

body.home .kg-skills .kg-card__title:has(.kg-skill-photo)::before {
	display: none;
}

body.home .kg-skills img.kg-skill-photo {
	display: block;
	width: 100%;
	max-width: 220px;
	height: auto;
	aspect-ratio: 1;
	margin-bottom: 22px;
	border-radius: 10px;
}

@media (max-width: 767px) {
	body.home .elementor-section.kg-learning-feature > .elementor-container { gap: 24px; }
	body.home .kg-how img.kg-learning-photo { max-width: 360px; margin: 0; }
	body.home .kg-skills .kg-card__title:has(.kg-skill-photo) {
		display: flex;
		align-items: center;
		gap: 16px;
	}
	body.home .kg-skills img.kg-skill-photo {
		flex: 0 0 100px;
		width: 100px;
		margin-bottom: 0;
	}
}

/* ==========================================================================
   14. Motion & print
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.kg-header,
	.kg-nav,
	.kg-nav.is-open,
	.kg-chevron,
	.kg-menu-toggle span,
	.kg-button,
	.kg-header__cta,
	body .elementor-button {
		transition: none !important;
		animation: none !important;
	}

	.kg-nav__item--d0.is-open > .kg-nav__sub--d1 {
		animation: none;
	}

	.kg-button:hover,
	body .elementor-button:is(:hover, :focus-visible) {
		transform: none !important;
	}

	body .kg-sec .kg-mosaic li,
	body .kg-sec .kg-mosaic li::after,
	body .kg-card > .elementor-widget-wrap,
	body .kg-card > .elementor-widget-wrap::before {
		transition: none !important;
	}

	body .kg-sec .kg-mosaic li:has(a):hover,
	body .kg-card:hover > .elementor-widget-wrap {
		transform: none !important;
	}

	body .kg-sec .kg-mosaic li:has(a):hover::after {
		translate: none;
	}
}

@media print {
	.kg-header,
	.kg-footer,
	.kg-nav-backdrop,
	.primary-sidebar {
		display: none !important;
	}
}

/* ---------- small fixes (2026-10-08) ---------- */

/* The post sidebar holds two search widgets (search-7 and search-9 in sidebar-primary): show the first only. */
body.kg-theme .primary-sidebar .widget_search ~ .widget_search {
	display: none;
}

/* Phones: category on its own line, so a wrapped meta line never starts with a dot. */
@media (max-width: 600px) {
	.kg-post-meta__cat {
		flex-basis: 100%;
	}

	.kg-post-meta__cat + *::before {
		display: none;
	}
}

/* Chaty: the «Задать вопрос» callout next to the floating button covers the
   text of whatever sits in the bottom corner on phones (hero tiles, article
   paragraphs). Keep the button, drop the callout under 768px. */
@media (max-width: 767px) {
	body .chaty .chaty-cta-main .on-hover-text {
		display: none !important;
	}
}

/* The Chaty callout text was saved with a Google Translate leftover
   (<div id="gtx-trans">, absolutely positioned) pasted in from the browser;
   hide it until the text is cleaned up in the Chaty settings. */
body .chaty #gtx-trans {
	display: none !important;
}

/* First screen: the program text under the H1 (migration 076) — a title line,
   two paragraphs and three points; longer than a lead, so a bit smaller. */
body .kg-hero .elementor-widget-text-editor.kg-lead--program {
	font-size: 16px;
	line-height: 1.7;
}

body .kg-hero .elementor-widget-text-editor.kg-lead--program > .elementor-widget-container {
	max-width: 600px;
}

body .kg-hero .kg-lead--program p {
	margin: 0 0 12px;
}

body .kg-hero .kg-lead--program .kg-lead__title {
	margin-bottom: 10px;
	color: #fff;
	font: 700 clamp(21px, 2vw, 26px)/1.3 var(--kg-font-display);
}

body .kg-hero .kg-lead--program .kg-lead__points {
	display: grid;
	gap: 10px;
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
	font-size: 15px;
	line-height: 1.6;
}

body .kg-hero .kg-lead--program .kg-lead__points li {
	position: relative;
	margin: 0;
	padding-left: 22px;
}

body .kg-hero .kg-lead--program .kg-lead__points li::before {
	content: "";
	position: absolute;
	top: .62em;
	left: 2px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #d69b7d;
}

body .kg-hero .kg-lead--program .kg-lead__points strong {
	color: #fff;
	font-weight: 700;
}

@media (max-width: 767px) {
	body .kg-hero .elementor-widget-text-editor.kg-lead--program {
		font-size: 15px;
	}

	body .kg-hero .kg-lead--program .kg-lead__points {
		font-size: 14.5px;
	}
}
