/*
 * Lexi — family site theme (leximobile.com). Mockup C, tile grid:
 * design/references/site-home-c.png. Rules: docs/v2/23-family-site.md §12.3.
 *
 * - Colour lives ONLY in the token blocks below (light, dark by system, dark by
 *   choice). Rules read var(--lx-*); a hex inside a rule is a bug.
 * - Logical properties (inline/block) everywhere — RTL comes for free (§12.3 p5).
 * - Nothing is sized to the English text: tiles and buttons grow (§12.3 p1),
 *   long words wrap (p2), no text-transform (p4 — Greek accents, Turkish i).
 * - Class prefix `lx-` — no bare .nav/.card/.btn (THEMES_GUIDE §11.21).
 */

:root {
	--lx-bg: #FAF6F0;
	--lx-surface: #FFFDF9;
	--lx-surface-2: #F3EDE4;
	--lx-ink: #1C1A17;
	--lx-ink-2: #4A453F;
	--lx-ink-3: #7A736A;
	--lx-line: #E8E0D4;
	--lx-accent: #E2703A;
	--lx-accent-strong: #D4612B;
	--lx-on-accent: #FFFFFF;
	--lx-accent-soft: #FBE3D4;
	--lx-sage: #8FA58A;
	--lx-sage-soft: #E3E8DC;
	--lx-teal: #3E7C7B;
	--lx-teal-soft: #DCE9E6;
	--lx-peach: #F6E7D6;
	--lx-sand: #F4EADD;
	--lx-paper: #FBF5EA;
	/* Paper things (a book page, a flashcard) stay paper in the dark scheme too:
	   their ink is fixed, not --lx-ink, or dark text would turn light on light paper. */
	--lx-paper-ink: #2A241D;
	--lx-paper-ink-2: #6B6259;
	--lx-paper-mark: #F2B48F;
	--lx-paper-tip: #FFFFFF;
	--lx-paper-shadow: 0 2px 0 rgba(0, 0, 0, 0.06), 0 8px 16px rgba(60, 40, 20, 0.12);
	--lx-paper-shadow-lift: 0 2px 0 rgba(0, 0, 0, 0.05), 0 18px 30px rgba(60, 40, 20, 0.18);
	--lx-shadow: 0 1px 2px rgba(60, 40, 20, 0.05), 0 8px 28px rgba(60, 40, 20, 0.07);
	--lx-shadow-lift: 0 2px 4px rgba(60, 40, 20, 0.06), 0 16px 40px rgba(60, 40, 20, 0.12);
	--lx-focus: 0 0 0 3px rgba(226, 112, 58, 0.45);
	/* A phone is a phone in both schemes: dark glass, the edge is what changes. */
	--lx-device: #1C1A17;
	--lx-device-edge: rgba(0, 0, 0, 0.08);
	--lx-device-shadow: 0 2px 4px rgba(60, 40, 20, 0.10), 0 30px 60px rgba(60, 40, 20, 0.22);
	--lx-store: #111111;
	--lx-store-ink: #FFFFFF;
	--lx-floor: #EBD9C3;
	/* верно / неверно: ошибка и правка, ответ в упражнении — не акцент, а свой смысл */
	--lx-good: #4E8A4A;
	--lx-good-soft: #E4EFDD;
	--lx-bad: #C8473A;
	--lx-bad-soft: #F9E1DC;

	--lx-radius: 24px;
	--lx-radius-sm: 14px;
	--lx-gap: clamp(12px, 1.4vw, 20px);
	--lx-pad: clamp(20px, 2.2vw, 32px);
	--lx-max: 1520px;
	--lx-gutter: clamp(16px, 3vw, 40px);

	--lx-font: 'Fira Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--lx-font-book: Georgia, 'Times New Roman', serif;

	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--lx-bg: #17151A;
		--lx-surface: #221F24;
		--lx-surface-2: #2B272D;
		--lx-ink: #F3EEE7;
		--lx-ink-2: #CFC7BD;
		--lx-ink-3: #9E968C;
		--lx-line: #37323A;
		--lx-accent: #F0814A;
		--lx-accent-strong: #E87538;
		--lx-on-accent: #1A1310;
		--lx-accent-soft: #3D2A20;
		--lx-sage: #9DB598;
		--lx-sage-soft: #263028;
		--lx-teal: #5FA3A1;
		--lx-teal-soft: #1F2E2E;
		--lx-peach: #2E2621;
		--lx-sand: #2A2420;
		--lx-paper: #F4ECDF;
		--lx-device-edge: rgba(255, 255, 255, 0.14);
		--lx-device-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 30px 60px rgba(0, 0, 0, 0.55);
		--lx-store: #000000;
		--lx-store-ink: #FFFFFF;
		--lx-floor: #2A231E;
		--lx-good: #8CC283;
		--lx-good-soft: #22301F;
		--lx-bad: #EE7D6E;
		--lx-bad-soft: #3A2220;
		--lx-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.35);
		--lx-shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.45);
		color-scheme: dark;
	}
}

:root[data-theme="dark"] {
	--lx-bg: #17151A;
	--lx-surface: #221F24;
	--lx-surface-2: #2B272D;
	--lx-ink: #F3EEE7;
	--lx-ink-2: #CFC7BD;
	--lx-ink-3: #9E968C;
	--lx-line: #37323A;
	--lx-accent: #F0814A;
	--lx-accent-strong: #E87538;
	--lx-on-accent: #1A1310;
	--lx-accent-soft: #3D2A20;
	--lx-sage: #9DB598;
	--lx-sage-soft: #263028;
	--lx-teal: #5FA3A1;
	--lx-teal-soft: #1F2E2E;
	--lx-peach: #2E2621;
	--lx-sand: #2A2420;
	--lx-paper: #F4ECDF;
	--lx-device-edge: rgba(255, 255, 255, 0.14);
	--lx-device-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 30px 60px rgba(0, 0, 0, 0.55);
	--lx-store: #000000;
	--lx-store-ink: #FFFFFF;
	--lx-floor: #2A231E;
	--lx-good: #8CC283;
	--lx-good-soft: #22301F;
	--lx-bad: #EE7D6E;
	--lx-bad-soft: #3A2220;
	--lx-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.35);
	--lx-shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.45);
	color-scheme: dark;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.lx {
	margin: 0;
	background: var(--lx-bg);
	color: var(--lx-ink);
	font-family: var(--lx-font);
	font-size: 17px;
	line-height: 1.5;
	overflow-wrap: anywhere;
	-webkit-font-smoothing: antialiased;
}

/* CJK: no spaces between words, so phrase breaking, looser lines, no tracking (§12.3 p3). */
:lang(ja) body.lx, body.lx:lang(ja) { word-break: auto-phrase; line-break: strict; line-height: 1.75; }
:lang(zh) body.lx, body.lx:lang(zh) { line-break: strict; line-height: 1.75; }

/* :where() — zero specificity, so a component class (.lx-btn on an <a>) wins */
:where(.lx) img { max-inline-size: 100%; block-size: auto; display: block; }
:where(.lx) a { color: inherit; }
.lx :focus-visible { outline: none; box-shadow: var(--lx-focus); border-radius: 10px; }

.lx-icon { inline-size: 1.15em; block-size: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lx-icon--sm { inline-size: 0.9em; block-size: 0.9em; }

.lx-wrap {
	max-inline-size: var(--lx-max);
	margin-inline: auto;
	padding-inline: var(--lx-gutter);
}

/* ---------- buttons & pills ---------- */

.lx-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6em;
	min-block-size: 52px;
	padding: 0.7em 1.6em;
	border: 0;
	border-radius: 999px;
	background: var(--lx-accent-strong);
	color: var(--lx-on-accent);
	font: 700 19px/1.2 var(--lx-font);
	text-decoration: none;
	text-align: center;
	white-space: normal;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.15s ease;
}
.lx-btn:hover { background: var(--lx-accent); }
.lx-btn:active { transform: translateY(1px); }
.lx-btn.is-soon { background: var(--lx-surface-2); color: var(--lx-ink-3); cursor: default; }
.lx-btn--sm { min-block-size: 44px; padding: 0.5em 1.3em; font-size: 17px; }
.lx-btn--wide { min-inline-size: min(100%, 290px); }

.lx-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	min-block-size: 44px;
	padding: 0.4em 1em;
	border: 1px solid var(--lx-line);
	border-radius: 999px;
	background: var(--lx-surface);
	color: var(--lx-ink);
	font: 600 16px/1.2 var(--lx-font);
	cursor: pointer;
	text-decoration: none;
}
.lx-pill:hover { border-color: var(--lx-ink-3); }
.lx-pill--quiet { background: var(--lx-surface-2); border-color: transparent; }
.lx-pill[aria-expanded="true"] .lx-icon:last-child { transform: rotate(180deg); }

.lx-iconbtn {
	display: inline-grid;
	place-items: center;
	inline-size: 44px;
	block-size: 44px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--lx-ink);
	cursor: pointer;
}
.lx-iconbtn:hover { background: var(--lx-surface-2); }

.lx-badge {
	display: inline-block;
	padding: 0.15em 0.6em;
	border-radius: 999px;
	background: var(--lx-surface-2);
	color: var(--lx-ink-3);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

/* ---------- header ---------- */

.lx-header {
	position: sticky;
	inset-block-start: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--lx-bg) 92%, transparent);
	backdrop-filter: saturate(1.2) blur(12px);
	-webkit-backdrop-filter: saturate(1.2) blur(12px);
}

/* the language hint (z-index 75) floats over the header; an open menu must not hide under it */
.lx-header:has(.lx-panel:not([hidden]), .lx-menu.is-open) { z-index: 76; }

.lx-bar {
	display: flex;
	align-items: center;
	gap: clamp(12px, 2vw, 28px);
	max-inline-size: var(--lx-max);
	margin-inline: auto;
	padding: 14px var(--lx-gutter);
	border-block-end: 1px solid var(--lx-line);
}

.lx-logo {
	font-weight: 800;
	font-size: clamp(30px, 3vw, 40px);
	letter-spacing: -0.03em;
	line-height: 1;
	text-decoration: none;
	color: var(--lx-ink);
	flex: none;
}
.lx .lx-logo:focus-visible { border-radius: 8px; }

.lx-learn, .lx-uilang { position: relative; }
.lx-learn__label { color: var(--lx-ink-3); font-weight: 500; }

.lx-menu {
	display: flex;
	align-items: center;
	gap: clamp(12px, 2vw, 28px);
	flex: 1 1 auto;
	min-inline-size: 0;
}
.lx-menu__end { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }

.lx-navs { display: flex; align-items: center; flex: none; }
.lx-nav ul, .lx-nav ol { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.lx-nav a, .lx-navgroup__toggle {
	display: flex;
	align-items: center;
	gap: 0.3em;
	padding: 0.5em 0.65em;
	border: 0;
	border-radius: 12px;
	background: none;
	color: var(--lx-ink);
	font: 500 16px/1.2 var(--lx-font);
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
}
.lx-nav a:hover, .lx-nav a[aria-current],
.lx-navgroup__toggle:hover, .lx-navgroup__toggle[aria-expanded="true"] { background: var(--lx-surface-2); }
.lx-navgroup { position: relative; }
.lx-navgroup__toggle[aria-expanded="true"] .lx-icon { transform: rotate(180deg); }
.lx-navgroup__heading { display: none; }
.lx-nav .lx-navdrop { inline-size: max-content; max-inline-size: calc(100vw - 2 * var(--lx-gutter)); padding: 8px; flex-direction: column; }
.lx-nav .lx-navdrop:not([hidden]) { display: flex; }
.lx-learn, .lx-menu__end { flex: none; }
.lx-learn__toggle, .lx-uilang__toggle, .lx-menu__end .lx-btn { white-space: nowrap; }

.lx-burger { display: none; }

/* ---------- panels: dropdown on desktop, bottom sheet on phones ---------- */

.lx-panel {
	position: absolute;
	inset-block-start: calc(100% + 10px);
	inset-inline-start: 0;
	z-index: 60;
	inline-size: min(420px, calc(100vw - 2 * var(--lx-gutter)));
	max-block-size: min(70vh, 560px);
	overflow: auto;
	padding: 18px;
	border: 1px solid var(--lx-line);
	border-radius: var(--lx-radius);
	background: var(--lx-surface);
	box-shadow: var(--lx-shadow-lift);
}
.lx-panel[hidden] { display: none; }
.lx-panel--narrow { inline-size: min(300px, calc(100vw - 2 * var(--lx-gutter))); inset-inline-start: auto; inset-inline-end: 0; }
.lx-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 10px; }
.lx-panel__title { margin: 0; font-weight: 700; font-size: 19px; }

.lx-search {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-block-end: 12px;
	padding: 0 14px;
	border: 1px solid var(--lx-line);
	border-radius: 14px;
	background: var(--lx-bg);
	color: var(--lx-ink-3);
}
.lx-search input {
	flex: 1;
	min-inline-size: 0;
	min-block-size: 46px;
	border: 0;
	background: transparent;
	color: var(--lx-ink);
	font: inherit;
	font-size: 17px;
}
.lx-search input:focus, .lx .lx-search input:focus-visible { outline: none; box-shadow: none; }
.lx-search:focus-within { box-shadow: var(--lx-focus); border-color: transparent; }

.lx-langlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lx-langlist__row {
	display: flex;
	align-items: center;
	gap: 12px;
	min-block-size: 48px;
	padding: 8px 12px;
	border-radius: 12px;
	text-decoration: none;
	color: var(--lx-ink);
}
button.lx-langlist__row { inline-size: 100%; border: 0; background: transparent; font: inherit; text-align: start; cursor: pointer; }
a.lx-langlist__row:hover, button.lx-langlist__row:hover { background: var(--lx-surface-2); }
.lx-langlist__row.is-current { background: var(--lx-accent-soft); }
.lx-langlist__autonym { font-weight: 600; }
.lx-langlist__name { color: var(--lx-ink-3); }
.lx-langlist__row .lx-badge, .lx-langlist__code { margin-inline-start: auto; }
.lx-langlist__code { color: var(--lx-ink-3); font-size: 14px; font-weight: 600; }
.lx-langlist__empty { margin: 8px 12px; color: var(--lx-ink-3); }

/* ---------- main, crumbs, article ---------- */

.lx-main { min-block-size: 50vh; }

.lx-crumbs .container { max-inline-size: var(--lx-max); margin-inline: auto; padding-inline: var(--lx-gutter); }
.lx-crumbs nav, .lx-crumbs > div { background: transparent !important; }
.lx-crumbs .breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 18px 0 0; font-size: 15px; color: var(--lx-ink-3); }
.lx-crumbs .breadcrumb-item + .breadcrumb-item::before { content: '/'; margin-inline-end: 6px; color: var(--lx-line); }
.lx-crumbs .breadcrumb a { color: var(--lx-ink-3); text-decoration: none; }
.lx-crumbs .breadcrumb a:hover { color: var(--lx-ink); }

.lx-flashes { display: grid; gap: 8px; max-inline-size: var(--lx-max); margin: 16px auto 0; padding-inline: var(--lx-gutter); }
.lx-flash { padding: 14px 18px; border-radius: var(--lx-radius-sm); background: var(--lx-surface); box-shadow: var(--lx-shadow); border-inline-start: 4px solid var(--lx-teal); font-weight: 600; }
.lx-flash--error, .lx-flash--warning { border-inline-start-color: var(--lx-accent-strong); }
.lx-flash--success { border-inline-start-color: var(--lx-sage); }

.lx-article { max-inline-size: 760px; margin-inline: auto; padding: 32px var(--lx-gutter) 72px; }
.lx-article__title { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -0.02em; font-weight: 800; margin: 0 0 24px; }
.lx-rich { hyphens: auto; } /* long-form text only: in tiles and headings a hyphen reads as a typo (overflow-wrap still saves a word too long for its box) */
.lx-rich h2 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; font-weight: 800; margin: 1.6em 0 0.5em; }
.lx-rich h3 { font-size: 22px; font-weight: 700; margin: 1.4em 0 0.4em; }
.lx-rich p, .lx-rich ul, .lx-rich ol { margin: 0 0 1em; }
.lx-rich a { color: var(--lx-teal); }

/* ---------- home: the tile grid (mockup C) ---------- */

.lx-home { padding-block: clamp(16px, 2.4vw, 28px) clamp(24px, 3vw, 40px); }

.lx-bento {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	grid-auto-rows: minmax(220px, auto);
	gap: var(--lx-gap);
	max-inline-size: var(--lx-max);
	margin-inline: auto;
	padding-inline: var(--lx-gutter);
}

.lx-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-inline-size: 0;
	padding: var(--lx-pad);
	border-radius: var(--lx-radius);
	background: var(--lx-surface);
	box-shadow: var(--lx-shadow);
	overflow: hidden;
	isolation: isolate;
	/* Headline sizes follow the TILE, not the window: the longest word of the
	   title has to fit its own box in every language (§12.3 p1–2). */
	container-type: inline-size;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
a.lx-tile, .lx-tile--link { text-decoration: none; color: inherit; }
.lx-tile--link:hover { box-shadow: var(--lx-shadow-lift); transform: translateY(-2px); }

.lx-tile--test { grid-column: span 5; grid-row: span 2; }
.lx-tile--tenses { grid-column: span 3; grid-row: span 2; background: var(--lx-sage-soft); }
.lx-tile--game { grid-column: span 4; grid-row: span 2; background: var(--lx-sand); }
.lx-tile--reader { grid-column: span 4; grid-row: span 2; background: var(--lx-peach); }
.lx-tile--cards { grid-column: span 4; grid-row: span 2; background: var(--lx-sand); }
.lx-tile--streak { grid-column: span 4; }
.lx-tile--levels { grid-column: span 4; }

.lx-eyebrow {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.14em;
	color: var(--lx-ink-2);
}
:lang(ja) .lx-eyebrow, :lang(zh) .lx-eyebrow, :lang(ko) .lx-eyebrow { letter-spacing: 0; }

.lx-tile__title {
	margin: 0;
	font-weight: 800;
	font-size: clamp(26px, 10cqi, 44px);
	line-height: 1.02;
	letter-spacing: -0.025em;
	text-wrap: balance;
}
.lx-tile--test .lx-tile__title { font-size: clamp(32px, 8.6cqi, 64px); }
.lx-tile--tenses .lx-tile__title { font-size: clamp(26px, 12cqi, 44px); }
.lx-tile--streak .lx-tile__title, .lx-tile--levels .lx-tile__title { font-size: clamp(22px, 6cqi, 30px); }

.lx-tile__text { margin: 0; color: var(--lx-ink-2); font-size: 18px; line-height: 1.45; max-inline-size: 34ch; }
.lx-tile__meta { margin: 0; font-size: 20px; color: var(--lx-ink); }
.lx-tile__body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; max-inline-size: 60%; }
.lx-tile--tenses .lx-tile__body, .lx-tile--game .lx-tile__body,
.lx-tile--reader .lx-tile__body, .lx-tile--cards .lx-tile__body { max-inline-size: none; }
/* the corner arrow sits over the eyebrow line, not over the title */
.lx-tile--link .lx-eyebrow { padding-inline-end: 56px; }
.lx-tile__cta { margin-block-start: auto; position: relative; z-index: 1; }

/* round arrow in the corner */
.lx-arrow {
	position: absolute;
	inset-block-start: var(--lx-pad);
	inset-inline-end: var(--lx-pad);
	z-index: 2;
	display: grid;
	place-items: center;
	inline-size: 48px;
	block-size: 48px;
	border-radius: 50%;
	background: var(--lx-surface);
	color: var(--lx-ink);
	box-shadow: var(--lx-shadow);
}
.lx-arrow .lx-icon { inline-size: 20px; block-size: 20px; }
[dir="rtl"] .lx-arrow .lx-icon { transform: scaleX(-1); }
.lx-tile--link:hover .lx-arrow { background: var(--lx-accent-strong); color: var(--lx-on-accent); }

.lx-tile__art { position: absolute; z-index: 0; pointer-events: none; }

/* test tile: progress ring + kitten on a card stack */
.lx-ring {
	position: absolute;
	inset-block-start: clamp(24px, 3vw, 48px);
	inset-inline-end: clamp(20px, 3vw, 44px);
	inline-size: clamp(130px, 13vw, 200px);
	aspect-ratio: 1;
	display: grid;
	place-items: center;
	text-align: center;
	z-index: 0;
}
.lx-ring svg { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; transform: rotate(-90deg); }
.lx-ring__track { fill: none; stroke: var(--lx-surface-2); stroke-width: 12; }
.lx-ring__value { fill: none; stroke: var(--lx-accent); stroke-width: 12; stroke-linecap: round; }
.lx-ring__label { display: block; color: var(--lx-ink-3); font-size: 15px; }
.lx-ring__number { display: block; font-weight: 800; font-size: clamp(40px, 4.4vw, 64px); line-height: 1; letter-spacing: -0.03em; }

.lx-test-art { inset-block-end: 14px; inset-inline-end: clamp(12px, 3vw, 44px); inline-size: clamp(120px, 12vw, 185px); }

/* stacked paper cards (HTML, not a picture — §11: nothing to break anatomically) */
.lx-stack { display: grid; }
.lx-stack > span {
	grid-area: 1 / 1;
	block-size: 64px;
	border-radius: 14px;
	background: var(--lx-paper);
	box-shadow: var(--lx-paper-shadow);
}
.lx-stack > span:nth-child(1) { background: var(--lx-sage); transform: translate(6%, 26px) rotate(-6deg); }
.lx-stack > span:nth-child(2) { background: var(--lx-accent); transform: translate(2%, 14px) rotate(4deg); }
.lx-stack > span:nth-child(3) { transform: rotate(-2deg); }

/* tenses tile: past – present – future */
.lx-timeline {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	margin-block-start: 8px;
	text-align: center;
	list-style: none;
	padding: 0;
}
.lx-timeline::before {
	content: '';
	position: absolute;
	inset-block-start: 11px;
	inset-inline: 4% 4%;
	block-size: 2px;
	background: var(--lx-ink-3);
	opacity: 0.45;
}
.lx-timeline li { position: relative; display: grid; justify-items: center; gap: 4px; }
.lx-timeline li::before {
	content: '';
	inline-size: 24px;
	block-size: 24px;
	border-radius: 50%;
	background: var(--lx-dot, var(--lx-accent));
	box-shadow: 0 0 0 4px var(--lx-sage-soft);
}
.lx-timeline li:nth-child(2) { --lx-dot: var(--lx-teal); }
.lx-timeline li:nth-child(3) { --lx-dot: var(--lx-sage); }
.lx-timeline b { font-weight: 600; font-size: 15px; line-height: 1.25; }
.lx-timeline span { color: var(--lx-ink-2); font-size: 14px; }
.lx-tile--tenses .lx-timeline { margin-block: auto 30%; }

.lx-hills {
	inset-inline: 0;
	inset-block-end: 0;
	block-size: 26%;
	color: var(--lx-sage);
}
.lx-hills svg { inline-size: 100%; block-size: 100%; display: block; }

/* game tile */
.lx-game-art { inset-block-end: 0; inset-inline-end: 0; inline-size: 78%; block-size: 68%; }
.lx-game-art .lx-room {
	position: absolute;
	inset: 18% 0 0 8%;
	border-start-start-radius: 28px;
	background:
		linear-gradient(to top, color-mix(in srgb, var(--lx-accent) 35%, var(--lx-sand)) 0 30%, transparent 30%),
		color-mix(in srgb, var(--lx-sage) 30%, var(--lx-sand));
}
.lx-game-art img { position: absolute; }
.lx-game-art .lx-kitten { inset-block-end: 6%; inset-inline-start: 34%; inline-size: 38%; }
.lx-game-art .lx-prop-1 { inset-block-end: 6%; inset-inline-end: 6%; inline-size: 18%; }
.lx-game-art .lx-prop-2 { inset-block-end: 8%; inset-inline-start: 14%; inline-size: 16%; }

/* reader tile: a page with one word highlighted and its translation */
.lx-book {
	position: relative;
	z-index: 1;
	margin-block-start: auto;
	margin-inline: 4% -10%;
	padding: 26px 30px 70px;
	border-radius: 10px;
	background: var(--lx-paper);
	color: var(--lx-paper-ink);
	font: 400 clamp(20px, 1.8vw, 26px)/1.45 var(--lx-font-book);
	transform: rotate(-6deg);
	box-shadow: var(--lx-paper-shadow-lift);
}
.lx-book mark { background: var(--lx-paper-mark); color: inherit; padding: 0 0.15em; border-radius: 4px; }
.lx-book__tip {
	position: absolute;
	inset-block-end: 18px;
	inset-inline-end: 18%;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 18px;
	border-radius: 12px;
	background: var(--lx-paper-tip);
	color: var(--lx-paper-ink);
	font: 600 17px/1.2 var(--lx-font);
	box-shadow: var(--lx-paper-shadow-lift);
	transform: rotate(6deg);
}

/* cards tile */
.lx-flash-art { inset-block-end: 8%; inset-inline-end: 8%; inline-size: clamp(170px, 17vw, 250px); }
.lx-flash-art .lx-stack > span { block-size: auto; aspect-ratio: 1 / 1.1; border-radius: 18px; }
.lx-flash-art .lx-stack > span:nth-child(1) { transform: translate(18%, -6%) rotate(10deg); }
.lx-flash-art .lx-stack > span:nth-child(2) { transform: translate(9%, -3%) rotate(5deg); }
.lx-flash-art .lx-stack > span:nth-child(3) {
	display: grid;
	place-items: center;
	align-content: center;
	gap: 2px;
	padding: 16px;
	transform: rotate(-4deg);
	color: var(--lx-paper-ink);
	text-align: center;
}
.lx-flash-art img { inline-size: 52%; margin-inline: auto; }
.lx-flash-art b { font-size: clamp(24px, 2.2vw, 32px); font-weight: 700; }
.lx-flash-art i { font-style: normal; color: var(--lx-paper-ink-2); font-size: 17px; }

/* streak tile */
.lx-tile--streak { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 18px; }
.lx-tile--streak .lx-tile__body { max-inline-size: none; }
.lx-tile--streak .lx-days { grid-column: 1 / -1; }
.lx-flame { flex: none; color: var(--lx-accent); }
.lx-flame .lx-icon { inline-size: 54px; block-size: 54px; stroke-width: 1.6; fill: var(--lx-accent-soft); }
.lx-days { display: flex; gap: 6px; margin: 4px 0 0; list-style: none; padding: 0; }
.lx-days li { inline-size: 26px; block-size: 26px; border-radius: 8px; background: var(--lx-surface-2); display: grid; place-items: center; color: var(--lx-on-accent); }
.lx-days li.is-done { background: var(--lx-accent-strong); }
.lx-days .lx-icon { inline-size: 16px; block-size: 16px; stroke-width: 3; }

/* levels tile */
.lx-tile--levels { flex-direction: row; align-items: flex-end; gap: 18px; }
.lx-tile--levels .lx-tile__body { max-inline-size: none; flex: 1 1 auto; }
.lx-levels { display: flex; align-items: flex-end; gap: 6px; list-style: none; margin: 0; padding: 0; flex: none; }
.lx-levels li { display: grid; justify-items: center; gap: 6px; font-size: 13px; color: var(--lx-ink-3); font-weight: 600; }
.lx-levels li::before { content: ''; display: block; inline-size: 22px; block-size: var(--h); border-radius: 6px 6px 3px 3px; background: var(--c); }
.lx-levels li:nth-child(1) { --h: 14px; --c: var(--lx-teal); }
.lx-levels li:nth-child(2) { --h: 24px; --c: color-mix(in srgb, var(--lx-teal) 70%, var(--lx-sage)); }
.lx-levels li:nth-child(3) { --h: 36px; --c: var(--lx-sage); }
.lx-levels li:nth-child(4) { --h: 50px; --c: color-mix(in srgb, var(--lx-sage) 60%, var(--lx-accent)); }
.lx-levels li:nth-child(5) { --h: 64px; --c: color-mix(in srgb, var(--lx-sage) 25%, var(--lx-accent)); }
.lx-levels li:nth-child(6) { --h: 80px; --c: var(--lx-accent); }

/* ---------- footer ---------- */

.lx-footer { border-block-start: 1px solid var(--lx-line); background: var(--lx-bg); }
.lx-footer__inner {
	display: grid;
	grid-template-columns: minmax(200px, 1.4fr) repeat(auto-fit, minmax(160px, 1fr));
	gap: 32px clamp(20px, 3vw, 48px);
	max-inline-size: var(--lx-max);
	margin-inline: auto;
	padding: clamp(32px, 4vw, 56px) var(--lx-gutter);
}
.lx-footer__brand p { margin: 10px 0 0; color: var(--lx-ink-2); max-inline-size: 32ch; }
.lx-footer__title { margin: 0 0 12px; font-weight: 700; font-size: 16px; }
.lx-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lx-footer__list a { color: var(--lx-ink-2); text-decoration: none; }
.lx-footer__list a:hover { color: var(--lx-ink); text-decoration: underline; }
.lx-footer__list .is-soon { color: var(--lx-ink-3); }
.lx-footer__bottom {
	max-inline-size: var(--lx-max);
	margin-inline: auto;
	padding: 18px var(--lx-gutter) 28px;
	border-block-start: 1px solid var(--lx-line);
	color: var(--lx-ink-3);
	font-size: 15px;
}

/* cookie banner from the engine (default/components/cookie-banner.html) */
.lx .cookie-banner {
	position: fixed;
	inset-inline: 16px;
	inset-block-end: 16px;
	z-index: 80;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	max-inline-size: 720px;
	margin-inline: auto;
	padding: 16px 20px;
	border-radius: var(--lx-radius-sm);
	background: var(--lx-surface);
	color: var(--lx-ink);
	box-shadow: var(--lx-shadow-lift);
}
.lx .cookie-banner[hidden], .lx .cookie-banner.is-hidden,
html[data-cookie-consent="granted"] .lx .cookie-banner, html[data-cookie-consent="denied"] .lx .cookie-banner { display: none; }
.lx .cookie-banner__actions { display: flex; gap: 10px; margin-inline-start: auto; }
.lx .cookie-banner .btn { min-block-size: 42px; padding: 0.4em 1.1em; border-radius: 999px; border: 1px solid var(--lx-line); background: var(--lx-surface-2); color: var(--lx-ink); font: 600 15px/1.2 var(--lx-font); cursor: pointer; }
.lx .cookie-banner .btn-primary { background: var(--lx-accent-strong); border-color: transparent; color: var(--lx-on-accent); }

/* ---------- engine forms: sign in, register, password (default/auth/*) ----------
 * The engine's markup is kept (plain POST forms, one place to maintain); only its
 * class names are styled here, and only under the auth pages: Bootstrap is not
 * loaded by this theme, so .row/.btn/.card below are scoped, not global
 * (THEMES_GUIDE §11.21). */

body.lx[class*="auth-"] .lx-main { padding: clamp(16px, 3vw, 40px) var(--lx-gutter) clamp(32px, 5vw, 64px); }

.lx .auth-page {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: var(--lx-gap);
	max-inline-size: 1120px;
	margin-inline: auto;
}
.lx .auth-page__hero {
	position: relative;
	min-block-size: 460px;
	padding: var(--lx-pad);
	border-radius: var(--lx-radius);
	background: var(--lx-sand) url('../images/cat-happy.webp') no-repeat right 6% bottom -12px / min(44%, 240px) auto;
	overflow: hidden;
}
[dir="rtl"] .lx .auth-page__hero { background-position: left 6% bottom -12px; }
.lx .auth-page__hero .site-logo { font-weight: 800; font-size: 34px; letter-spacing: -0.03em; text-decoration: none; }
.lx .auth-page__hero h2 { margin: 28px 0 0; max-inline-size: 12ch; font-weight: 800; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
.lx .auth-page__form {
	padding: clamp(24px, 3vw, 44px);
	border-radius: var(--lx-radius);
	background: var(--lx-surface);
	box-shadow: var(--lx-shadow);
}
.lx .auth-page__form h1 { margin: 0 0 6px; font-weight: 800; font-size: clamp(30px, 3vw, 40px); letter-spacing: -0.02em; }
.lx .auth-page__form > p { margin: 0 0 24px; color: var(--lx-ink-2); }

body.lx[class*="auth-"] .row { display: grid; gap: 16px; }
body.lx[class*="auth-"] .kit-label, body.lx[class*="auth-"] .form-label { display: flex; justify-content: space-between; gap: 12px; margin-block-end: 6px; font-weight: 600; font-size: 15px; }
body.lx[class*="auth-"] .form-control {
	inline-size: 100%;
	min-block-size: 50px;
	padding: 0 16px;
	border: 1px solid var(--lx-line);
	border-radius: 14px;
	background: var(--lx-bg);
	color: var(--lx-ink);
	font: inherit;
}
body.lx[class*="auth-"] .form-control:focus { outline: none; border-color: transparent; box-shadow: var(--lx-focus); }
body.lx[class*="auth-"] .form-control.is-invalid { border-color: var(--lx-accent-strong); }
body.lx[class*="auth-"] .form-check { display: flex; align-items: center; gap: 10px; }
body.lx[class*="auth-"] .form-check-input { inline-size: 20px; block-size: 20px; margin: 0; accent-color: var(--lx-accent-strong); }
body.lx[class*="auth-"] .btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
	min-block-size: 52px; padding: 0.6em 1.6em; border: 0; border-radius: 999px;
	background: var(--lx-surface-2); color: var(--lx-ink);
	font: 700 18px/1.2 var(--lx-font); cursor: pointer; white-space: normal;
}
body.lx[class*="auth-"] .btn-primary { background: var(--lx-accent-strong); color: var(--lx-on-accent); }
body.lx[class*="auth-"] .btn-primary:hover { background: var(--lx-accent); }
body.lx[class*="auth-"] .w-100 { inline-size: 100%; }
body.lx[class*="auth-"] .btn-text-link, .lx .auth-page__footer a { color: var(--lx-teal); font-weight: 600; text-decoration: none; }
body.lx[class*="auth-"] .alert { display: flex; gap: 10px; align-items: flex-start; margin-block-end: 16px; padding: 12px 16px; border-radius: var(--lx-radius-sm); background: var(--lx-accent-soft); }
body.lx[class*="auth-"] .icon { inline-size: 1.1em; block-size: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; }
.lx .auth-page__divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--lx-ink-3); font-size: 15px; }
.lx .auth-page__divider::before, .lx .auth-page__divider::after { content: ''; flex: 1; block-size: 1px; background: var(--lx-line); }
.lx .auth-social { display: grid; gap: 10px; }
.lx .btn-social {
	display: flex; align-items: center; justify-content: center; min-block-size: 50px;
	border: 1px solid var(--lx-line); border-radius: 999px; background: var(--lx-surface);
	color: var(--lx-ink); font-weight: 600; text-decoration: none;
}
.lx .btn-social:hover { border-color: var(--lx-ink-3); }
.lx .auth-page__footer { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 22px; color: var(--lx-ink-2); }
.lx .password-strength { block-size: 4px; margin-block-start: 8px; border-radius: 2px; background: var(--lx-surface-2); overflow: hidden; }
.lx .password-strength .bar { block-size: 100%; inline-size: 0; background: var(--lx-accent-strong); transition: inline-size 0.2s ease; }

/* reset-password is the engine's older card markup */
body.lx.auth-reset-password .container { max-inline-size: 460px; margin-inline: auto; padding-block: 24px; }
body.lx.auth-reset-password .card { padding: clamp(24px, 3vw, 36px); border-radius: var(--lx-radius); background: var(--lx-surface); box-shadow: var(--lx-shadow); }
body.lx.auth-reset-password .text-center { text-align: center; }
body.lx.auth-reset-password .text-muted { color: var(--lx-ink-3); }
body.lx.auth-reset-password .mb-1, body.lx.auth-reset-password .mb-3, body.lx.auth-reset-password .mb-4 { margin-block-end: 16px; }
body.lx.auth-reset-password .form-floating { display: flex; flex-direction: column-reverse; gap: 6px; }

@media (max-width: 760px) {
	.lx .auth-page { grid-template-columns: minmax(0, 1fr); }
	.lx .auth-page__hero { min-block-size: 200px; background-size: auto 170px; }
	.lx .auth-page__hero h2 { max-inline-size: 60%; font-size: 26px; }
}

/* ---------- cabinet: the engine's account area (sidebar, profile) + the Lexi pages ----------
 * The engine's sidebar and profile are Bootstrap markup; this theme loads no Bootstrap,
 * so the few classes they use are styled here, scoped to the account pages only. */

body.lx.account-page .lx-main { padding-block: clamp(16px, 3vw, 36px) clamp(32px, 5vw, 64px); }
.lx .account-page .container-xxl { max-inline-size: var(--lx-max); margin-inline: auto; padding-inline: var(--lx-gutter); }
.lx .account-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--lx-gap); align-items: start; }

.lx .account-sidebar { position: sticky; inset-block-start: 96px; padding: 18px; border-radius: var(--lx-radius); background: var(--lx-surface); box-shadow: var(--lx-shadow); }
.lx .account-sidebar__user { display: flex; align-items: center; gap: 12px; padding-block-end: 14px; margin-block-end: 10px; border-block-end: 1px solid var(--lx-line); }
.lx .account-sidebar__avatar { display: grid; place-items: center; inline-size: 44px; block-size: 44px; flex: none; border-radius: 50%; background: var(--lx-accent-soft); color: var(--lx-accent-strong); font-weight: 800; }
.lx .account-sidebar__user-info { min-inline-size: 0; }
.lx .account-sidebar__name { font-weight: 700; }
.lx .account-sidebar__email { color: var(--lx-ink-3); font-size: 14px; overflow-wrap: anywhere; }
.lx .account-sidebar__toggle { display: none; margin-inline-start: auto; border: 0; background: transparent; color: var(--lx-ink); }
.lx .account-sidebar nav { display: grid; gap: 2px; }
.lx .account-sidebar nav a { display: flex; align-items: center; gap: 10px; min-block-size: 44px; padding: 8px 12px; border-radius: 12px; color: var(--lx-ink); text-decoration: none; font-weight: 500; }
.lx .account-sidebar nav a:hover { background: var(--lx-surface-2); }
.lx .account-sidebar nav a.is-active { background: var(--lx-accent-soft); font-weight: 700; }
.lx .account-sidebar nav .divider { block-size: 1px; margin: 8px 0; background: var(--lx-line); }
.lx .account-sidebar nav .logout { color: var(--lx-ink-3); }
.lx .account-page .icon { inline-size: 1.15em; block-size: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.lx-cab { display: grid; gap: 18px; }
.lx-cab__title { margin: 0; font-weight: 800; font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.02em; }
.lx-cab__subtitle { margin: 0 0 8px; font-weight: 700; font-size: 22px; }
.lx-cab__card { padding: var(--lx-pad); border-radius: var(--lx-radius); background: var(--lx-surface); box-shadow: var(--lx-shadow); }
.lx-cab__card--danger { box-shadow: inset 0 0 0 2px var(--lx-accent-soft), var(--lx-shadow); }
.lx-cab__list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.lx-cab__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 16px 20px; border-radius: var(--lx-radius-sm); background: var(--lx-surface); box-shadow: var(--lx-shadow); }
.lx-cab__row > span:first-child { display: grid; gap: 2px; }
.lx-cab__name { font-weight: 800; font-size: 19px; }
.lx-cab__text { margin: 0; color: var(--lx-ink-2); }
.lx-cab__muted { margin: 0; color: var(--lx-ink-3); font-size: 15px; }
.lx-cab__stat { margin: 0; font-weight: 700; font-size: 20px; }
.lx-cab__apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--lx-gap); }
.lx-cab__app { display: flex; flex-direction: column; gap: 10px; padding: var(--lx-pad); border-radius: var(--lx-radius); background: var(--lx-surface); box-shadow: var(--lx-shadow); }
.lx-cab__app .lx-pill { align-self: flex-start; margin-block-start: auto; }
.lx-cab__app-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lx-cab__form { display: grid; gap: 10px; max-inline-size: 460px; margin-block-start: 14px; }
.lx-cab__label { font-weight: 600; font-size: 15px; }
.lx-cab__input { min-block-size: 50px; padding: 0 16px; border: 1px solid var(--lx-line); border-radius: 14px; background: var(--lx-bg); color: var(--lx-ink); font: inherit; }
.lx-cab__input:focus { outline: none; border-color: transparent; box-shadow: var(--lx-focus); }
.lx-badge--on { background: var(--lx-accent-soft); color: var(--lx-accent-strong); }
.lx-btn--danger { justify-self: start; }

/* the engine's profile page (default/site/account/profile.html) */
body.lx.account-page .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--lx-gap); }
body.lx.account-page .card { border-radius: var(--lx-radius); background: var(--lx-surface); box-shadow: var(--lx-shadow); overflow: hidden; }
body.lx.account-page .card-header { padding: 18px var(--lx-pad) 0; }
body.lx.account-page .card-title, body.lx.account-page h4 { margin: 0; font-weight: 800; }
body.lx.account-page h4 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.02em; margin-block-end: 18px; }
body.lx.account-page .card-body { padding: 14px var(--lx-pad) var(--lx-pad); }
body.lx.account-page .mb-3 { margin-block-end: 14px; }
body.lx.account-page .mt-4 { margin-block-start: var(--lx-gap); }
body.lx.account-page .form-label { display: block; margin-block-end: 6px; font-weight: 600; font-size: 15px; }
body.lx.account-page .form-control, body.lx.account-page .form-select { inline-size: 100%; min-block-size: 48px; padding: 0 14px; border: 1px solid var(--lx-line); border-radius: 14px; background: var(--lx-bg); color: var(--lx-ink); font: inherit; }
body.lx.account-page .form-control:disabled { color: var(--lx-ink-3); }
body.lx.account-page .form-control:focus, body.lx.account-page .form-select:focus { outline: none; border-color: transparent; box-shadow: var(--lx-focus); }
body.lx.account-page .btn { display: inline-flex; align-items: center; gap: 8px; min-block-size: 46px; padding: 0.5em 1.3em; border: 1px solid var(--lx-line); border-radius: 999px; background: var(--lx-surface-2); color: var(--lx-ink); font: 700 16px/1.2 var(--lx-font); cursor: pointer; text-decoration: none; }
body.lx.account-page .btn-primary { border-color: transparent; background: var(--lx-accent-strong); color: var(--lx-on-accent); }
body.lx.account-page .btn-sm { min-block-size: 38px; font-size: 14px; }
body.lx.account-page .list-group { display: grid; gap: 8px; }
body.lx.account-page .list-group-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--lx-bg); }
body.lx.account-page .text-muted { color: var(--lx-ink-3); }
body.lx.account-page .d-inline { display: inline; }
body.lx.account-page .badge { padding: 0.15em 0.6em; border-radius: 999px; background: var(--lx-surface-2); font-size: 13px; }

@media (max-width: 900px) {
	.lx .account-grid { grid-template-columns: minmax(0, 1fr); }
	.lx .account-sidebar { position: static; }
}

/* «this site is in your language» — a quiet strip under the header, not a modal */
.lx-suggest {
	position: fixed;
	inset-inline: 16px;
	inset-block-start: 88px;
	z-index: 75;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 10px 12px;
	max-inline-size: 560px;
	margin-inline: auto;
	padding: 12px 12px 12px 20px;
	border-radius: var(--lx-radius-sm);
	background: var(--lx-surface);
	box-shadow: var(--lx-shadow-lift);
}
.lx-suggest[hidden] { display: none; }
.lx-suggest__text { margin: 0; font-weight: 600; }
@media (max-width: 520px) {
	.lx-suggest { grid-template-columns: minmax(0, 1fr) auto; }
	.lx-suggest__text { grid-column: 1 / -1; }
	.lx-suggest .lx-btn { justify-self: start; }
}

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
	.lx-bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.lx-tile--test { grid-column: span 6; }
	.lx-tile--tenses, .lx-tile--game, .lx-tile--reader, .lx-tile--cards,
	.lx-tile--streak, .lx-tile--levels { grid-column: span 3; }
}

@media (max-width: 1280px) {
	.lx-bar, .lx-menu { gap: 8px; }
	.lx-menu__end { gap: 6px; }
	.lx-nav ul, .lx-nav ol { gap: 0; }
	.lx-nav a, .lx-navgroup__toggle { font-size: 15px; padding-inline: 0.42em; }
	.lx-pill { padding-inline: 0.65em; font-size: 15px; }
}

@media (max-width: 1100px) {
	.lx-bar, .lx-menu { gap: 6px; }
	.lx-logo { font-size: 26px; }
	.lx-nav a, .lx-navgroup__toggle { padding-inline: 0.3em; gap: 0.15em; }
}

@media (max-width: 1000px) {
	.lx-burger { display: inline-grid; margin-inline-start: auto; }
	.lx-menu {
		position: absolute;
		inset-block-start: 100%;
		inset-inline: 0;
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		padding: 16px var(--lx-gutter) 24px;
		background: var(--lx-bg);
		border-block-end: 1px solid var(--lx-line);
		box-shadow: var(--lx-shadow);
	}
	/* the header is sticky: without its own scroll the end of a long menu is out of reach */
	.lx-menu.is-open { display: flex; max-block-size: calc(100dvh - 73px); overflow-y: auto; }
	.lx-navs { flex-direction: column; align-items: stretch; gap: 8px; }
	.lx-nav ul, .lx-nav ol { flex-direction: column; }
	.lx-nav a { padding: 0.8em 0.6em; font-size: 19px; white-space: normal; }
	/* the burger shows groups open: the button gives way to a heading over its links */
	.lx-navgroup__toggle { display: none; }
	.lx-navgroup__heading { display: block; margin: 10px 0 0; padding-inline: 0.6em; color: var(--lx-ink-3); font-size: 14px; font-weight: 700; }
	.lx-menu .lx-navdrop, .lx-menu .lx-navdrop[hidden] { display: flex; inline-size: auto; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; }
	.lx-menu__end { margin-inline-start: 0; flex-direction: column; align-items: stretch; }
	/* inside the open menu a panel unfolds in place: there is no room to float it */
	.lx-menu .lx-panel { position: static; inline-size: auto; max-block-size: none; margin-block-start: 8px; box-shadow: none; }
	.lx-menu .lx-uilang__toggle { align-self: flex-start; }
	.lx-learn__label { display: none; }
	.lx-bar { position: relative; }
}

@media (max-width: 680px) {
	body.lx { font-size: 16px; }
	.lx-bento { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
	.lx-bento > .lx-tile { grid-column: auto; grid-row: auto; min-block-size: 0; }
	.lx-tile--test { padding-block-end: 220px; }
	.lx-tile__body { max-inline-size: 100%; }
	.lx-ring { inset-block-start: auto; inset-block-end: 24px; inset-inline-end: auto; inset-inline-start: var(--lx-pad); inline-size: 150px; }
	.lx-test-art { inline-size: 150px; }
	.lx-tile--tenses { padding-block-end: 120px; }
	.lx-tile--tenses .lx-timeline { margin-block: 8px 0; }
	.lx-tile--game { padding-block-end: 240px; }
	.lx-game-art { inline-size: 100%; block-size: 220px; }
	.lx-footer__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.lx-footer__brand { grid-column: 1 / -1; }
	.lx-tile--cards { padding-block-end: 250px; }
	.lx-tile--reader .lx-book { margin-inline: 0; }
	.lx-tile--streak, .lx-tile--levels { flex-wrap: wrap; }
	.lx-days { margin-inline-start: 0; }

	/* the «what I learn» window becomes a sheet from the bottom (23 §12.2) */
	.lx-learn .lx-panel {
		position: fixed;
		inset-block-start: auto;
		inset-block-end: 0;
		inset-inline: 0;
		inline-size: auto;
		max-block-size: 80vh;
		border-radius: var(--lx-radius) var(--lx-radius) 0 0;
	}
}

/* ---------- grammar topic (24 §3.1) ---------- */

.lx-sr { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.lx-topic { max-inline-size: 860px; margin-inline: auto; padding: 24px var(--lx-gutter) 80px; }
.lx-topic__head { margin-block-end: 8px; }
.lx-topic__eyebrow { margin: 0 0 10px; color: var(--lx-teal); font-weight: 700; font-size: 15px; }
.lx-topic__title { margin: 0 0 16px; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -0.02em; font-weight: 800; }
.lx-topic__lead { margin: 0 0 22px; font-size: clamp(19px, 1.7vw, 22px); color: var(--lx-ink-2); hyphens: auto; }
.lx-topic__toc { display: flex; flex-wrap: wrap; gap: 8px; }
.lx-topic__toc a { padding: 6px 14px; border-radius: 999px; background: var(--lx-surface-2); font-weight: 600; font-size: 15px; text-decoration: none; }
.lx-topic__toc a:hover { background: var(--lx-accent-soft); }

/* Шапка с иллюстрацией (lexi/site/hero-art.html, LexiArt): тёплая карточка во всю ширину
   страницы, текст слева, котёнок справа; ниже — колонка чтения прежней ширины. */
.lx-topic:has(> .lx-topic__head--art) { max-inline-size: 1180px; }
.lx-topic:has(> .lx-topic__head--art) > :not(.lx-topic__head--art) { max-inline-size: 860px; margin-inline: auto; }
.lx-topic__head--art { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) clamp(200px, 26vw, 340px); column-gap: clamp(20px, 3vw, 48px); align-items: center; margin-block-end: 24px; padding: clamp(24px, 3.6vw, 52px); border-radius: calc(var(--lx-radius) + 8px); background: linear-gradient(135deg, var(--lx-peach), var(--lx-sand)); overflow: hidden; isolation: isolate; }
.lx-topic__head--art::before { content: ''; position: absolute; z-index: -1; inset-block-end: -38%; inset-inline-end: -6%; inline-size: clamp(260px, 34vw, 480px); aspect-ratio: 1; border-radius: 50%; background: var(--lx-accent-soft); opacity: 0.8; }
.lx-topic__head--art > :not(.lx-topic__art) { grid-column: 1; }
.lx-topic__head--art .lx-topic__lead { max-inline-size: 640px; }
.lx-topic__art { grid-column: 2; grid-row: 1 / span 6; align-self: end; justify-self: center; margin-block-end: calc(-1 * clamp(24px, 3.6vw, 52px) + 8px); }
.lx-topic__art img { display: block; inline-size: 100%; block-size: auto; max-block-size: 340px; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(60, 40, 20, 0.16)); animation: lx-art-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes lx-art-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
@media (max-width: 720px) {
	.lx-topic__head--art { grid-template-columns: 1fr; }
	.lx-topic__art { grid-row: 1; grid-column: 1; justify-self: end; margin: -8px -4px 0 0; }
	.lx-topic__art img { max-block-size: 150px; inline-size: auto; }
	.lx-topic__head--art::before { inset-block-start: -30%; inset-block-end: auto; inline-size: 260px; }
}
@media (prefers-reduced-motion: reduce) { .lx-topic__art img { animation: none; } }

/* Котёнок-спутник у упражнений (lexi/site/mascot.html, mascot.js): выглядывает из
   правого нижнего угла, пока упражнение на экране; позы — три картинки одного размера. */
.lx-mascot { position: fixed; z-index: 40; inset-block-end: 0; inset-inline-end: clamp(8px, 2vw, 28px); inline-size: clamp(92px, 9vw, 132px); transform: translateY(105%); transition: transform 0.45s cubic-bezier(0.3, 1.4, 0.5, 1); pointer-events: none; }
.lx-mascot.is-shown { transform: translateY(4%); pointer-events: auto; }
.lx-mascot__cat { position: relative; display: block; inline-size: 100%; padding: 0; border: 0; background: none; cursor: pointer; transform-origin: 50% 100%; animation: lx-mascot-breathe 3.4s ease-in-out infinite; }
.lx-mascot__cat:focus-visible { outline: none; box-shadow: var(--lx-focus); border-radius: 50%; }
.lx-mascot__cat:hover { animation: lx-mascot-wiggle 0.5s ease-in-out; }
.lx-mascot__pose { position: absolute; inset: 0; inline-size: 100%; block-size: auto; opacity: 0; transition: opacity 0.12s; filter: drop-shadow(0 6px 8px rgba(60, 40, 20, 0.18)); }
.lx-mascot__pose--sit { position: relative; display: block; } /* задаёт высоту кнопке: aspect-ratio у <button> не работает */
.lx-mascot[data-pose="sit"] .lx-mascot__pose--sit,
.lx-mascot[data-pose="cheer"] .lx-mascot__pose--cheer,
.lx-mascot[data-pose="think"] .lx-mascot__pose--think { opacity: 1; }
.lx-mascot__cat.is-hop { animation: lx-mascot-hop 0.7s cubic-bezier(0.3, 1.6, 0.5, 1); }
.lx-mascot__cat.is-wobble { animation: lx-mascot-wobble 0.9s ease-in-out; }
.lx-mascot__say { position: absolute; inset-block-end: 92%; inset-inline-end: 30%; margin: 0; inline-size: max-content; max-inline-size: min(240px, 70vw); padding: 10px 14px; border-radius: 18px 18px 4px 18px; background: var(--lx-surface); color: var(--lx-ink); box-shadow: var(--lx-shadow-lift); font-weight: 700; font-size: 15px; line-height: 1.3; opacity: 0; transform: translateY(6px) scale(0.92); transform-origin: 100% 100%; transition: opacity 0.2s, transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1); pointer-events: none; }
.lx-mascot.is-saying .lx-mascot__say { opacity: 1; transform: none; }
.lx-mascot__close { position: absolute; inset-block-start: 4%; inset-inline-end: 0; inline-size: 24px; block-size: 24px; padding: 0; border: 0; border-radius: 50%; background: var(--lx-surface); color: var(--lx-ink-3); box-shadow: var(--lx-shadow); font-size: 16px; line-height: 24px; cursor: pointer; opacity: 0; transition: opacity 0.2s; }
.lx-mascot:hover .lx-mascot__close, .lx-mascot__close:focus-visible { opacity: 1; }
.lx-mascot__heart { position: absolute; inset-block-start: 22%; inset-inline-start: calc(50% - 9px + var(--dx, 0px)); inline-size: 18px; block-size: 18px; background: var(--lx-accent); clip-path: path('M9 16.5 1.6 9.3A4.4 4.4 0 0 1 9 3.6a4.4 4.4 0 0 1 7.4 5.7z'); animation: lx-mascot-heart 1.2s ease-out both; pointer-events: none; }
@keyframes lx-mascot-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.015, 0.985); } }
@keyframes lx-mascot-wiggle { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-4deg); } 70% { transform: rotate(3deg); } }
@keyframes lx-mascot-hop { 0% { transform: translateY(0) scale(1.04, 0.94); } 40% { transform: translateY(-22%) scale(0.97, 1.04); } 75% { transform: translateY(0) scale(1.05, 0.95); } 100% { transform: none; } }
@keyframes lx-mascot-wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 55% { transform: rotate(4deg); } 80% { transform: rotate(-2deg); } }
@keyframes lx-mascot-heart { from { opacity: 0; transform: translateY(0) scale(0.6); } 20% { opacity: 1; } to { opacity: 0; transform: translateY(-70px) scale(1.1) rotate(var(--dx, 0deg)); } }
@media (max-width: 640px) { .lx-mascot__close { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	.lx-mascot, .lx-mascot__say { transition: none; }
	.lx-mascot__cat, .lx-mascot__cat.is-hop, .lx-mascot__cat.is-wobble, .lx-mascot__cat:hover { animation: none; }
	.lx-mascot__heart { display: none; }
}

.lx-topic__section { margin-block-start: 48px; scroll-margin-block-start: 96px; }
.lx-topic__section h2 { margin: 0 0 18px; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; font-weight: 800; }
.lx-topic__section h3 { margin: 26px 0 10px; font-size: 21px; font-weight: 700; }
.lx-topic__note { margin: 12px 0 0; color: var(--lx-ink-2); hyphens: auto; }

.lx-forms { overflow-x: auto; border-radius: var(--lx-radius-sm); background: var(--lx-surface); box-shadow: var(--lx-shadow); }
.lx-forms__table { inline-size: 100%; border-collapse: collapse; font-size: 17px; }
.lx-forms__table th, .lx-forms__table td { padding: 12px 16px; text-align: start; vertical-align: top; overflow-wrap: normal; }
.lx-forms__table thead th { background: var(--lx-surface-2); font-size: 15px; font-weight: 700; color: var(--lx-ink); }
/* столбцы форм — каждый своим оттенком (макет site-topic-below-1.png): глаз держит столбец */
.lx-forms__col:nth-child(4n+2) { background: var(--lx-sage-soft); }
.lx-forms__table thead .lx-forms__col:nth-child(4n+3) { background: var(--lx-accent-soft); }
.lx-forms__table thead .lx-forms__col:nth-child(4n+4) { background: var(--lx-teal-soft); }
.lx-forms__table thead .lx-forms__col:nth-child(4n+5) { background: var(--lx-sand); }
.lx-forms__table tbody tr + tr > * { border-block-start: 1px solid var(--lx-line); }
.lx-forms__table tbody th { font-weight: 700; color: var(--lx-teal); white-space: nowrap; }
.lx-forms__table td { min-inline-size: 9em; }
.lx-forms__table tr.is-key > * { background: color-mix(in srgb, var(--lx-sage-soft) 60%, transparent); }
.lx-forms__table tr.is-key td { font-weight: 600; }

.lx-topic__rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.lx-topic__rules li { display: grid; align-content: start; gap: 4px; padding: 14px 16px; border-radius: var(--lx-radius-sm); background: var(--lx-sage-soft); box-shadow: var(--lx-shadow); font-size: 16px; }
.lx-topic__rules li:nth-child(4n+2) { background: var(--lx-accent-soft); }
.lx-topic__rules li:nth-child(4n+3) { background: var(--lx-teal-soft); }
.lx-topic__rules li:nth-child(4n+4) { background: var(--lx-sand); }
.lx-topic__examples { color: var(--lx-ink); font-weight: 700; }

.lx-topic__uses { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: var(--lx-gap); }
.lx-topic__use { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; column-gap: 14px; padding: 20px 22px; border-radius: var(--lx-radius-sm); background: var(--lx-surface); box-shadow: var(--lx-shadow); }
.lx-topic__use > * { grid-column: 1 / -1; }
.lx-topic__use-icon { grid-column: 1; grid-row: 1; display: grid; place-items: center; inline-size: 48px; block-size: 48px; border-radius: 50%; background: var(--lx-sage-soft); color: var(--lx-teal); }
.lx-topic__use-icon .lx-icon { inline-size: 26px; block-size: 26px; stroke-width: 1.8; }
.lx-topic__use:nth-child(3n+2) .lx-topic__use-icon { background: var(--lx-accent-soft); color: var(--lx-accent-strong); }
.lx-topic__use:nth-child(3n+3) .lx-topic__use-icon { background: var(--lx-teal-soft); }
.lx-topic__use-icon ~ h3 { grid-column: 2; grid-row: 1; align-self: center; }
.lx-topic__use-icon + h3 { margin-block-end: 0; }
.lx-topic__use-icon ~ p { margin-block-start: 12px; }
.lx-topic__use h3 { margin: 0 0 6px; font-size: 19px; }
.lx-topic__use p { margin: 0 0 12px; color: var(--lx-ink-2); hyphens: auto; }
.lx-topic__samples { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lx-topic__samples li { display: grid; gap: 1px; padding-inline-start: 12px; border-inline-start: 3px solid var(--lx-sage); }
.lx-topic__sample { font-weight: 600; }
.lx-topic__gloss { color: var(--lx-ink-3); font-size: 15px; }

.lx-topic__markers { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lx-topic__markers li { padding: 6px 14px; border-radius: 999px; background: var(--lx-surface); box-shadow: var(--lx-shadow); font-weight: 600; font-size: 16px; }

/* ошибка и правка — две половины одной карточки (макет site-topic-below-2.png) */
.lx-topic__mistakes { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.lx-topic__mistakes li { overflow: hidden; border-radius: var(--lx-radius-sm); background: var(--lx-surface); box-shadow: var(--lx-shadow); }
.lx-topic__mistakes li > p { margin: 0; padding: 10px 18px 14px; color: var(--lx-ink-2); hyphens: auto; }
.lx-topic__mistakes .lx-topic__pair { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 0; color: var(--lx-ink); font-weight: 700; }
.lx-topic__wrong, .lx-topic__right { display: flex; align-items: baseline; gap: 10px; padding: 12px 18px; }
.lx-topic__wrong { background: var(--lx-bad-soft); text-decoration-thickness: 2px; text-decoration-color: var(--lx-bad); }
.lx-topic__right { background: var(--lx-good-soft); }
.lx-topic__wrong .lx-icon, .lx-topic__right .lx-icon { flex: none; align-self: center; stroke-width: 3; }
.lx-topic__wrong .lx-icon { color: var(--lx-bad); }
.lx-topic__right .lx-icon { color: var(--lx-good); }
@media (max-width: 560px) { .lx-topic__mistakes .lx-topic__pair { grid-template-columns: 1fr; } }

.lx-topic__section--test { padding: var(--lx-pad); border-radius: var(--lx-radius); background: var(--lx-sand); }
.lx-topic__section--test .lx-topic__note { margin: -8px 0 16px; }

.lx-topic__next ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--lx-gap); margin: 0; padding: 0; list-style: none; }
.lx-topic__next a { display: grid; gap: 4px; padding: 18px 22px; border-radius: var(--lx-radius-sm); background: var(--lx-surface); box-shadow: var(--lx-shadow); font-weight: 800; font-size: 19px; text-decoration: none; transition: box-shadow 0.15s ease; }
.lx-topic__next a:hover { box-shadow: var(--lx-shadow-lift); }
.lx-topic__next-label { color: var(--lx-ink-3); font-weight: 600; font-size: 14px; }

/* Блок «продолжить в приложении» (lexi/site/continue.html, 28 §6; макет site-continue-*.png):
   встроенная карточка с котёнком, на узком экране котёнок сверху. */
.lx-continue { display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: center; gap: var(--lx-gap); padding: var(--lx-pad); border-radius: var(--lx-radius); background: var(--lx-accent-soft); }
.lx-continue .lx-eyebrow { margin-block-end: 10px; }
.lx-topic__section .lx-continue__title { margin: 0 0 12px; }
.lx-continue__text { margin: 0 0 22px; color: var(--lx-ink-2); }
.lx-continue__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.lx-continue__about { color: var(--lx-ink-2); font-weight: 600; text-underline-offset: 4px; }
.lx-continue__art { position: relative; block-size: 230px; }
.lx-continue__cat { position: absolute; inset-block-end: 0; inset-inline-end: 0; inline-size: 150px; block-size: auto; }
.lx-continue__bowl { position: absolute; inset-block-end: 0; inset-inline-start: 0; inline-size: 92px; block-size: auto; }
.lx-continue__words { position: absolute; inset-block-start: 0; inset-inline-start: 0; display: grid; justify-items: start; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lx-continue__words li { padding: 6px 14px; border-radius: 999px; background: var(--lx-paper); color: var(--lx-paper-ink); box-shadow: var(--lx-paper-shadow); font-weight: 700; font-size: 17px; }
.lx-continue__words li:nth-child(2) { margin-inline-start: 18px; }
.lx-continue__words li:nth-child(3) { margin-inline-start: 6px; }
@media (max-width: 640px) {
	.lx-continue { grid-template-columns: 1fr; }
	.lx-continue__art { order: -1; block-size: 200px; }
	.lx-continue__words { inset-inline-start: auto; inset-inline-end: 0; justify-items: end; }
	.lx-continue__cat { inset-inline-end: auto; inset-inline-start: 0; }
	.lx-continue__bowl { inset-inline-start: 130px; }
	.lx-continue .lx-btn { inline-size: 100%; justify-content: center; }
	.lx-continue__actions { justify-content: center; }
}

.lx-topic__faq { display: grid; gap: 10px; }
.lx-topic__faq details { overflow: hidden; border-radius: var(--lx-radius-sm); background: var(--lx-surface); box-shadow: var(--lx-shadow); }
.lx-topic__faq summary { position: relative; display: block; padding: 16px 56px 16px 20px; font-weight: 700; font-size: 18px; cursor: pointer; list-style: none; transition: background-color 0.15s ease; }
.lx-topic__faq summary::-webkit-details-marker { display: none; }
.lx-topic__faq summary::after { content: ''; position: absolute; inset-block-start: 50%; inset-inline-end: 22px; inline-size: 9px; block-size: 9px; border-inline-end: 2px solid currentColor; border-block-end: 2px solid currentColor; transform: translateY(-70%) rotate(45deg); transition: transform 0.2s ease; }
.lx-topic__faq details[open] summary { background: var(--lx-accent-soft); }
.lx-topic__faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.lx-topic__faq summary:hover { background: var(--lx-surface-2); }
.lx-topic__faq details p { margin: 0; padding: 14px 20px 18px; color: var(--lx-ink-2); hyphens: auto; }
@media (prefers-reduced-motion: reduce) { .lx-topic__faq summary::after { transition: none; } }

/* pair hub and section contents (24 §3 types 2–3) */
.lx-hub__paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: var(--lx-gap); margin-block-start: 32px; }
.lx-hub__path { padding: var(--lx-pad); border-radius: var(--lx-radius); background: var(--lx-sage-soft); }
.lx-hub__path--alt { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; background: var(--lx-sand); }
.lx-hub__path h2 { margin: 0 0 14px; font-size: clamp(24px, 2.4vw, 30px); font-weight: 800; }
.lx-hub__path--alt h2, .lx-hub__path--alt p { margin: 0; }
.lx-hub__path--alt .lx-btn { margin-block-start: auto; }
.lx-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: lx-step; }
.lx-steps__item { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 12px 16px; border-radius: var(--lx-radius-sm); background: var(--lx-surface); counter-increment: lx-step; font-weight: 700; }
.lx-steps__item::before { content: counter(lx-step); display: grid; place-items: center; inline-size: 26px; block-size: 26px; border-radius: 50%; background: var(--lx-surface-2); color: var(--lx-ink-2); font-size: 13px; }
.lx-steps__item a { text-decoration: none; }
.lx-steps__item a::after { content: " →"; color: var(--lx-teal); }
.lx-steps__item a:hover { color: var(--lx-teal); text-decoration: underline; text-underline-offset: 3px; }
.lx-steps__item.is-soon { color: var(--lx-ink-3); }
.lx-steps__min { margin-inline-start: auto; color: var(--lx-ink-3); font-weight: 600; font-size: 14px; }
/* путь «с нуля» — дорожка: шаги связаны линией, урок в игре — с котёнком (макет site-hub-below.png) */
.lx-hub__path .lx-steps__item:not(:last-child)::after { content: ''; position: absolute; z-index: 0; inset-block-start: calc(50% + 13px); inset-inline-start: 28px; inline-size: 2px; block-size: calc(100% - 18px); background: var(--lx-sage); opacity: 0.6; }
.lx-hub__path .lx-steps__item::before { position: relative; z-index: 1; }
.lx-hub__path .lx-steps__item:not(.is-soon)::before { background: var(--lx-sage); color: var(--lx-on-accent); }
.lx-steps__item.is-product > a::before { content: ''; display: inline-block; inline-size: 26px; block-size: 26px; margin-inline-end: 8px; vertical-align: -7px; background: url('../images/mascot-sit.webp') center / contain no-repeat; }
.lx-steps__item.is-soon { background: color-mix(in srgb, var(--lx-surface) 55%, transparent); font-weight: 600; }
.lx-steps__item.is-soon .lx-badge { display: none; }
.lx-hub__levels { display: grid; gap: 8px; inline-size: 100%; margin: 4px 0; padding: 0; list-style: none; }
.lx-hub__levels li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 12px; padding: 10px 14px; border-radius: var(--lx-radius-sm); background: var(--lx-surface); }
.lx-hub__levels .lx-lv__pill { grid-row: span 2; font-weight: 800; }
.lx-hub__count { font-weight: 600; font-size: 15px; }
.lx-hub__meter { inline-size: 100%; block-size: 8px; border: 0; border-radius: 999px; background: var(--lx-surface-2); appearance: none; }
.lx-hub__meter::-webkit-meter-bar { border: 0; border-radius: 999px; background: var(--lx-surface-2); block-size: 8px; }
.lx-hub__meter::-webkit-meter-optimum-value, .lx-hub__meter::-webkit-meter-suboptimum-value, .lx-hub__meter::-webkit-meter-even-less-good-value { border-radius: 999px; background: var(--lv); }
.lx-hub__meter::-moz-meter-bar { border-radius: 999px; background: var(--lv); }
/* разделы — плитки с картинкой */
.lx-hub__sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--lx-gap); margin: 0; padding: 0; list-style: none; }
.lx-hub__sections a { display: grid; align-content: start; gap: 6px; block-size: 100%; padding: 20px 22px; border-radius: var(--lx-radius); background: var(--lx-sage-soft); color: var(--lx-ink); text-decoration: none; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.lx-hub__sections li:nth-child(3n+2) a { background: var(--lx-teal-soft); }
.lx-hub__sections li:nth-child(3n+3) a { background: var(--lx-sand); }
.lx-hub__sections a:hover { box-shadow: var(--lx-shadow-lift); transform: translateY(-2px); }
.lx-hub__sections img { justify-self: center; inline-size: auto; block-size: 120px; margin-block-end: 6px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(60, 40, 20, 0.14)); }
.lx-hub__sections b { font-size: 22px; font-weight: 800; }
.lx-hub__sections + .lx-topic__note { margin-block-start: 16px; }
.lx-hub__sections span { color: var(--lx-ink-2); font-size: 16px; }
/* оглавление: шапка уровня + написанные темы карточками, будущие — тихие строки */
.lx-index__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-block-end: 16px; }
.lx-index__head h2 { margin: 0 !important; }
.lx-index__head .lx-lv__pill { padding: 6px 14px; font-weight: 800; font-size: 20px; }
.lx-index__count { margin-inline-start: auto; padding: 4px 12px; border-radius: 999px; background: var(--lx-surface-2); color: var(--lx-ink-2); font-weight: 700; font-size: 14px; }
.lx-steps--index { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.lx-steps--index .lx-steps__item { align-items: flex-start; flex-wrap: nowrap; box-shadow: var(--lx-shadow); }
.lx-steps--index .lx-steps__item a { display: grid; gap: 2px; flex: 1; }
.lx-steps--index .lx-steps__item a::after { position: absolute; inset-block-start: 12px; inset-inline-end: 16px; color: var(--lx-accent-strong); font-size: 18px; }
.lx-steps--index .lx-steps__item a b { padding-inline-end: 20px; }
.lx-index__meta { color: var(--lx-ink-3); font-weight: 600; font-size: 14px; }
.lx-steps--index .lx-steps__item.is-soon { box-shadow: none; background: transparent; padding-block: 8px; }

.lx-hub__app { display: grid; gap: 4px; padding: 18px 22px; border-radius: var(--lx-radius-sm); background: var(--lx-surface-2); font-weight: 800; font-size: 19px; }

/* exercise (24 §6): the server prints every task; exercise.js marks the box .is-live */
.lx-ex__progress { block-size: 8px; margin-block-end: 14px; border-radius: 999px; background: var(--lx-surface-2); overflow: hidden; }
.lx-ex:not(.is-live) .lx-ex__progress { display: none; }
.lx-ex__progress span { display: block; inline-size: 0; block-size: 100%; border-radius: inherit; background: var(--lx-good); transition: inline-size 0.4s ease; }
.lx-ex__list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: lx-ex; }
.lx-ex__item { position: relative; padding: 16px 20px 16px 56px; border-radius: var(--lx-radius-sm); background: var(--lx-surface); box-shadow: var(--lx-shadow); counter-increment: lx-ex; }
.lx-ex__item::before { content: counter(lx-ex); position: absolute; inset-inline-start: 16px; inset-block-start: 16px; display: grid; place-items: center; inline-size: 28px; block-size: 28px; border-radius: 50%; background: var(--lx-surface-2); color: var(--lx-ink-2); font-weight: 700; font-size: 14px; }
.lx-ex__item[data-state="right"] { box-shadow: inset 0 0 0 2px var(--lx-good), var(--lx-shadow); }
.lx-ex__item[data-state="right"]::before { background: var(--lx-good); color: var(--lx-on-accent); content: '✓'; }
.lx-ex__item[data-state="wrong"] { box-shadow: inset 0 0 0 2px var(--lx-bad-soft), var(--lx-shadow); }
.lx-ex__item[data-state="wrong"]::before { background: var(--lx-bad); color: var(--lx-on-accent); }
.lx-ex__form { display: grid; gap: 10px; margin: 0; }
/* одна строка с пропуском — кнопки справа от неё, а не под ней (макет site-topic-below-2.png) */
@media (min-width: 720px) {
	.lx-ex__item:is([data-kind="cloze"], [data-kind="write"]) .lx-ex__form { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; }
}
.lx-ex__text { margin: 0; font-size: 19px; line-height: 1.9; }
.lx-ex__hint { margin: 0; color: var(--lx-teal); font-weight: 700; }
.lx-ex__base { color: var(--lx-ink-3); }
.lx-ex__gap { display: inline-block; min-inline-size: 3em; padding-inline: 4px; border-block-end: 2px solid var(--lx-ink-3); text-align: center; font-weight: 700; }
.lx-ex__input { inline-size: 9em; max-inline-size: 100%; min-block-size: 40px; margin-inline: 4px; padding: 0 10px; border: 1px solid var(--lx-line); border-radius: 10px; background: var(--lx-bg); color: var(--lx-ink); font: 600 18px/1.2 var(--lx-font); }
.lx-ex__input--line { inline-size: 100%; margin-inline: 0; min-block-size: 48px; }
.lx-ex__input:focus { outline: none; border-color: transparent; box-shadow: var(--lx-focus); }
.lx-ex__input:disabled { color: var(--lx-ink-2); }
.lx-ex__item[data-state="right"] .lx-ex__input { border-color: var(--lx-good); background: var(--lx-good-soft); color: var(--lx-ink); }
.lx-ex__item[data-state="wrong"] .lx-ex__input { border-color: var(--lx-bad); background: var(--lx-bad-soft); color: var(--lx-ink); }
.lx-ex__options, .lx-ex__chunks { display: flex; flex-wrap: wrap; gap: 8px; }
.lx-ex__option, .lx-ex__chunk { min-block-size: 44px; padding: 0.4em 1.1em; border: 1px solid var(--lx-line); border-radius: 999px; background: var(--lx-bg); color: var(--lx-ink); font: 600 17px/1.2 var(--lx-font); cursor: pointer; }
.lx-ex__option:hover:not(:disabled), .lx-ex__chunk:hover:not(:disabled) { border-color: var(--lx-ink-3); }
.lx-ex__option:disabled, .lx-ex__chunk:disabled { cursor: default; }
.lx-ex__item[data-state="right"] .lx-ex__option.is-picked { background: var(--lx-good-soft); border-color: var(--lx-good); }
.lx-ex__item[data-state="wrong"] .lx-ex__option.is-picked { background: var(--lx-bad-soft); border-color: var(--lx-bad); }
.lx-ex__built { display: flex; flex-wrap: wrap; gap: 8px; min-block-size: 52px; margin: 0; padding: 4px; border-block-end: 2px dashed var(--lx-line); }
.lx-ex__built .lx-ex__chunk { background: var(--lx-teal-soft); border-color: transparent; }
.lx-ex__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.lx-ex__skip { padding: 0; border: 0; background: none; color: var(--lx-ink-3); font: 600 15px/1.2 var(--lx-font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.lx-ex__item[data-state] .lx-ex__actions { display: none; }
.lx-ex:not(.is-live) .lx-ex__actions { display: none; }
.lx-ex__verdict { margin: 8px 0 0; font-weight: 700; }
.lx-ex__verdict:empty { display: none; }
.lx-ex__item[data-state="right"] .lx-ex__verdict { color: var(--lx-good); }
.lx-ex__item[data-state="wrong"] .lx-ex__verdict { color: var(--lx-bad); }
.lx-ex__right { margin: 4px 0 0; font-weight: 600; }
.lx-ex__right span { color: var(--lx-teal); font-weight: 800; }
.lx-ex__why { margin: 4px 0 0; color: var(--lx-ink-2); hyphens: auto; }
.lx-ex__result { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-block-start: 16px; padding: 18px 22px; border-radius: var(--lx-radius-sm); background: var(--lx-surface); box-shadow: var(--lx-shadow-lift); }
.lx-ex__result[hidden] { display: none; }
.lx-ex__score { margin: 0; font-weight: 800; font-size: 22px; }

/* trainer (24 §3.2): the server prints the first task; trainer.js swaps the next ones into the same card */
.lx-tr { display: grid; gap: 14px; }
.lx-tr [hidden] { display: none !important; }
.lx-tr__hint { margin: 0; color: var(--lx-ink-2); }
.lx-tr__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; color: var(--lx-ink-3); font-weight: 700; font-size: 15px; }
.lx-tr__bar:empty, .lx-tr:not(.is-live) .lx-tr__bar { display: none; }
.lx-tr__tally { color: var(--lx-sage); }
.lx-tr__card { display: grid; gap: 16px; margin: 0; padding: var(--lx-pad); border-radius: var(--lx-radius-sm); background: var(--lx-surface); box-shadow: var(--lx-shadow-lift); }
.lx-tr__card[data-state="right"] { box-shadow: inset 0 0 0 2px var(--lx-sage), var(--lx-shadow-lift); }
.lx-tr__card[data-state="wrong"] { box-shadow: inset 0 0 0 2px var(--lx-accent-soft), var(--lx-shadow-lift); }
.lx-tr__verb { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0; }
.lx-tr__base { font-weight: 800; font-size: clamp(30px, 4vw, 40px); line-height: 1.1; color: var(--lx-ink); }
.lx-tr__gloss { color: var(--lx-ink-2); font-size: 18px; }
.lx-tr__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.lx-tr__field { display: grid; gap: 6px; align-content: start; }
.lx-tr__label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-weight: 700; }
.lx-tr__label small { color: var(--lx-ink-3); font-weight: 600; font-size: 14px; }
.lx-tr__field[data-state="right"] .lx-ex__input { border-color: var(--lx-sage); background: var(--lx-sage-soft); }
.lx-tr__field[data-state="wrong"] .lx-ex__input { border-color: var(--lx-accent-strong); background: var(--lx-accent-soft); }
.lx-tr__answer { margin: 0; font-weight: 600; }
.lx-tr__answer span { color: var(--lx-teal); font-weight: 800; }
.lx-tr__verdict { margin: 0; font-weight: 700; }
.lx-tr__verdict:empty { display: none; }
.lx-tr__card[data-state="right"] .lx-tr__verdict { color: var(--lx-sage); }
.lx-tr__card[data-state="wrong"] .lx-tr__verdict { color: var(--lx-accent-strong); }
.lx-tr__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.lx-tr:not(.is-live) .lx-tr__actions, .lx-tr:not(.is-live) .lx-tr__settings { display: none; }
.lx-tr__result { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-radius: var(--lx-radius-sm); background: var(--lx-surface); box-shadow: var(--lx-shadow-lift); }
.lx-tr__again { display: flex; flex-wrap: wrap; gap: 10px; }
.lx-tr__settings { border-radius: var(--lx-radius-sm); background: var(--lx-surface-2); }
.lx-tr__settings summary { padding: 12px 18px; font-weight: 700; cursor: pointer; }
.lx-tr__options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px 24px; margin: 0; padding: 0 18px 16px; }
.lx-tr__options fieldset { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; }
.lx-tr__options legend { margin-block-end: 6px; padding: 0; color: var(--lx-ink-2); font-weight: 700; font-size: 14px; }
.lx-tr__options label { display: flex; align-items: center; gap: 8px; min-block-size: 32px; cursor: pointer; }
.lx-tr__options input { accent-color: var(--lx-accent); inline-size: 18px; block-size: 18px; }
.lx-tr__count { color: var(--lx-ink-3); font-size: 14px; }

/* alphabet (24 §3 type 9): the server prints every letter; alphabet.js adds the browser's
   voice. Without a voice (`is-mute`) the sound buttons and the listening trainer hide */
.lx-ab [hidden] { display: none !important; }
.lx-ab__mute-note { display: none; margin: 0; padding: 12px 18px; border-radius: var(--lx-radius-sm); background: var(--lx-sand); color: var(--lx-ink-2); }
.lx-ab.is-mute .lx-ab__mute-note { display: block; }
.lx-ab.is-mute .lx-ab__voiced, .lx-ab:not(.is-live) .lx-ab__voiced { display: none; }
.lx-ab__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr)); gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; }
.lx-ab__card { display: grid; align-content: start; gap: 4px; padding: 14px 16px 16px; border-radius: var(--lx-radius-sm); background: var(--lx-surface); box-shadow: var(--lx-shadow); }
.lx-ab__card--vowel { box-shadow: inset 0 0 0 2px var(--lx-teal-soft), var(--lx-shadow); }
.lx-ab__say, .lx-ab__word { margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: start; }
.lx-ab.is-live:not(.is-mute) .lx-ab__say, .lx-ab.is-live:not(.is-mute) .lx-ab__word { cursor: pointer; }
.lx-ab.is-live:not(.is-mute) .lx-ab__word { text-decoration: underline dotted var(--lx-ink-3); text-underline-offset: 3px; }
.lx-ab__say:focus-visible, .lx-ab__word:focus-visible { outline: none; border-radius: 8px; box-shadow: var(--lx-focus); }
.lx-ab__glyph { display: block; font-weight: 800; font-size: 44px; line-height: 1.05; letter-spacing: 0.02em; color: var(--lx-ink); }
.lx-ab__word[data-lx-audio] { cursor: pointer; text-decoration: underline dotted var(--lx-ink-3); text-underline-offset: 3px; }
.lx-ab.is-live:not(.is-mute) .lx-ab__say:hover .lx-ab__glyph { color: var(--lx-accent-strong); }
.lx-ab__ipa { color: var(--lx-teal); font-weight: 700; font-size: 18px; }
.lx-ab__ipa small { color: var(--lx-ink-3); font-weight: 600; font-size: 14px; }
.lx-ab__reading { font-weight: 700; font-size: 18px; }
.lx-ab__example { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-block-start: 6px; font-size: 16px; }
.lx-ab__word { font-weight: 700; }
.lx-ab__word-ipa { color: var(--lx-ink-3); font-size: 14px; }
.lx-ab__gloss { inline-size: 100%; color: var(--lx-ink-2); }
/* алфавит строкой — тёплая карточка, гласные акцентом (макет site-alphabet-below.png) */
.lx-ab__strip { display: grid; justify-items: center; gap: 18px; padding: var(--lx-pad); border-radius: var(--lx-radius); background: linear-gradient(135deg, var(--lx-peach), var(--lx-sand)); }
.lx-ab__line { display: grid; grid-template-columns: repeat(13, 1fr); gap: 4px 0.2em; margin: 0; inline-size: 100%; font-weight: 800; font-size: clamp(26px, 4.2vw, 50px); line-height: 1.2; text-align: center; }
@media (max-width: 560px) { .lx-ab__line { grid-template-columns: repeat(7, 1fr); } }
.lx-ab__line span.is-vowel { color: var(--lx-accent-strong); }
.lx-ab__line span { border-radius: 6px; transition: background-color 0.15s ease, color 0.15s ease; }
.lx-ab__line span { display: inline-block; padding-inline: 0.06em; }
.lx-ab__line span.is-playing { background: var(--lx-surface); color: var(--lx-accent-strong); box-shadow: inset 0 -4px 0 var(--lx-accent); transform: translateY(-3px); }
.lx-ab__play { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.lx-ab__play .lx-btn { gap: 10px; }
.lx-ab__vowels { margin: 0 0 10px; font-size: 30px; letter-spacing: 0.12em; color: var(--lx-teal); }
.lx-ab__traps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.lx-ab__traps li { display: grid; justify-items: center; align-content: start; gap: 6px; padding: 16px 14px; border-radius: var(--lx-radius-sm); background: var(--lx-surface); box-shadow: var(--lx-shadow); text-align: center; color: var(--lx-ink-2); }
.lx-ab__trap-pair { display: flex; align-items: baseline; gap: 10px; color: var(--lx-ink); font-size: 34px; font-weight: 800; line-height: 1.1; }
.lx-ab__trap-pair i { font-style: normal; color: var(--lx-accent-strong); font-size: 0.75em; }
.lx-ab-tr { position: relative; display: grid; gap: 14px; padding: var(--lx-pad); border-radius: var(--lx-radius); background: linear-gradient(135deg, var(--lx-peach), var(--lx-sand)); }
/* котёнок в наушниках слушает вместе с учеником; клавиатура уходит из-под него */
.lx-ab-tr--art { padding-inline-end: calc(var(--lx-pad) + clamp(110px, 16vw, 170px)); }
.lx-ab-tr__art { position: absolute; inset-block-end: 0; inset-inline-end: clamp(8px, 1.6vw, 20px); inline-size: clamp(110px, 16vw, 170px); block-size: auto; filter: drop-shadow(0 8px 10px rgba(60, 40, 20, 0.16)); pointer-events: none; }
@media (max-width: 560px) {
	.lx-ab-tr--art { padding-inline-end: var(--lx-pad); padding-block-start: 110px; }
	.lx-ab-tr__art { inset-block-start: -8px; inset-block-end: auto; inline-size: 96px; }
}
.lx-ab-tr__keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.lx-ab-tr__key { min-block-size: 52px; border: 1px solid var(--lx-line); border-radius: var(--lx-radius-sm); background: var(--lx-surface); color: var(--lx-ink); font: 800 22px/1 var(--lx-font); cursor: pointer; }
.lx-ab-tr__key:hover:not(:disabled) { border-color: var(--lx-ink-3); }
.lx-ab-tr__key:disabled { cursor: default; }
.lx-ab-tr:not(.is-running) .lx-ab-tr__key:not([data-state]) { opacity: 0.55; }
.lx-ab-tr__key[data-state="right"] { background: var(--lx-good-soft); border-color: var(--lx-good); opacity: 1; }
.lx-ab-tr__key[data-state="wrong"] { background: var(--lx-bad-soft); border-color: var(--lx-bad); opacity: 1; }
.lx-ab-tr .lx-tr__verdict[data-state="right"] { color: var(--lx-good); }
.lx-ab-tr .lx-tr__verdict[data-state="wrong"] { color: var(--lx-bad); }

/* levels (24 §2.1 urovni/): the table reuses the forms table; cards are tinted by group A / B / C */
/* Цвет уровня — один на странице: лестница, плашка в таблице, карточка, колонка тем
   (макет site-levels-below.png). A — шалфей, B — бирюза, C — терракота. */
.lx-lv--a1 { --lv: var(--lx-sage); --lv-soft: var(--lx-sage-soft); }
.lx-lv--a2 { --lv: color-mix(in srgb, var(--lx-sage) 60%, var(--lx-teal)); --lv-soft: var(--lx-sage-soft); }
.lx-lv--b1 { --lv: color-mix(in srgb, var(--lx-teal) 75%, var(--lx-sage)); --lv-soft: var(--lx-teal-soft); }
.lx-lv--b2 { --lv: var(--lx-teal); --lv-soft: var(--lx-teal-soft); }
.lx-lv--c1 { --lv: color-mix(in srgb, var(--lx-accent) 75%, var(--lx-sand)); --lv-soft: var(--lx-accent-soft); }
.lx-lv--c2 { --lv: var(--lx-accent-strong); --lv-soft: var(--lx-accent-soft); }
.lx-lv__ladder { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: end; gap: 8px; margin: 8px 0 18px; padding: 0; list-style: none; }
.lx-lv__ladder li:nth-child(1) { --rise: 0px; }
.lx-lv__ladder li:nth-child(2) { --rise: 18px; }
.lx-lv__ladder li:nth-child(3) { --rise: 36px; }
.lx-lv__ladder li:nth-child(4) { --rise: 54px; }
.lx-lv__ladder li:nth-child(5) { --rise: 72px; }
.lx-lv__ladder li:nth-child(6) { --rise: 90px; }
.lx-lv__ladder a { display: grid; align-content: start; justify-items: center; gap: 4px; min-block-size: calc(120px + var(--rise)); padding: 14px 8px 12px; border-radius: var(--lx-radius-sm) var(--lx-radius-sm) 8px 8px; background: var(--lv); color: var(--lx-on-accent); text-align: center; text-decoration: none; box-shadow: var(--lx-shadow); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.lx-lv__ladder a:hover { transform: translateY(-3px); box-shadow: var(--lx-shadow-lift); }
.lx-lv__ladder b { font-size: clamp(24px, 3vw, 36px); font-weight: 800; line-height: 1; }
.lx-lv__ladder span { font-size: 14px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.lx-lv__ladder small { margin-block-start: auto; padding: 2px 10px; border-radius: 999px; background: var(--lx-surface); color: var(--lx-ink); font-weight: 700; font-size: 13px; }
@media (max-width: 560px) {
	.lx-lv__ladder { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.lx-lv__ladder li { --rise: 0px !important; }
	.lx-lv__ladder a { min-block-size: 0; }
}
.lx-lv__pill { display: inline-block; min-inline-size: 2.6em; padding: 2px 10px; border-radius: 999px; background: var(--lv); color: var(--lx-on-accent); text-align: center; }
.lx-lv__table th[scope="row"] a { font-weight: 800; text-decoration: none; }
.lx-lv__table td { white-space: nowrap; }
.lx-lv__table td:last-child { white-space: normal; min-inline-size: 11em; }
.lx-lv__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--lx-gap); }
.lx-lv__card { display: grid; align-content: start; gap: 8px; padding: 20px 22px; border-radius: var(--lx-radius-sm); background: var(--lx-surface); box-shadow: var(--lx-shadow); scroll-margin-block-start: 96px; }
.lx-lv__card { box-shadow: inset 4px 0 0 var(--lv, var(--lx-line)), var(--lx-shadow); }
.lx-lv__group { margin: 0; color: var(--lx-ink-3); font-weight: 700; font-size: 14px; }
.lx-topic__section .lx-lv__card h3 { margin: 0; font-size: 22px; }
.lx-lv__code { color: var(--lv, var(--lx-teal)); font-weight: 800; }
.lx-lv__can { display: grid; gap: 6px; margin: 0; padding-inline-start: 1.1em; }
.lx-lv__facts { margin: 4px 0 0; color: var(--lx-ink-3); font-size: 15px; }
.lx-lv__topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr)); align-items: start; gap: 12px; margin-block-start: 16px; }
.lx-lv__topic-level { overflow: hidden; border-radius: var(--lx-radius-sm); background: var(--lx-surface); box-shadow: var(--lx-shadow); }
.lx-topic__section .lx-lv__topic-level h3 { margin: 0; padding: 10px 18px; background: var(--lv); color: var(--lx-on-accent); font-size: 20px; }
.lx-lv__topic-level ul { padding: 14px 18px 16px !important; }
.lx-lv__topic-level a { color: var(--lx-ink); font-weight: 700; text-decoration-color: var(--lv); text-underline-offset: 3px; }
.lx-lv__topic-level ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.lx-lv__soon { color: var(--lx-ink-3); }
.lx-lv__more { margin: 18px 0 0; font-weight: 700; }

/* verbs table: one tbody per level. Its own vertical scroll only on wide screens —
   on a phone a scroll inside a scroll traps the swipe */
@media (min-width: 900px) {
	.lx-verbs { max-block-size: min(80vh, 900px); overflow-y: auto; }
	.lx-verbs thead th { position: sticky; inset-block-start: 0; z-index: 1; }
}
.lx-verbs .lx-forms__table td { min-inline-size: 7em; }
.lx-verbs .lx-verbs__level th { background: var(--lx-surface-2); color: var(--lx-ink-2); font-size: 14px; }
.lx-verbs__gloss { color: var(--lx-ink-2); }

@media (max-width: 640px) {
	.lx-verbs .lx-forms__table { font-size: 15px; }
	.lx-verbs .lx-forms__table th, .lx-verbs .lx-forms__table td { padding: 10px 8px; min-inline-size: 0; }
	.lx-ex__item { padding: 14px 16px 14px 48px; }
	.lx-ex__item::before { inset-inline-start: 12px; inset-block-start: 14px; }
	.lx-ex__text { font-size: 18px; }
}

/* ---------- lexitail.com landing (partials/lexitail/*) ----------
   First screen after the mockup chosen by the owner 23.10:
   design/references/site-lexitail-landing-en.png. The other sections are still the
   frame — section order and rhythm from the theme's own tokens. */

.lx-btn--quiet { background: var(--lx-surface); color: var(--lx-ink); box-shadow: inset 0 0 0 1px var(--lx-line); }
.lx-btn--quiet:hover { background: var(--lx-surface-2); }
.lx-btn--store { border-radius: 12px; background: var(--lx-store); color: var(--lx-store-ink); font-size: 17px; }
.lx-btn--store:hover { background: var(--lx-store); opacity: 0.85; }

.lx-landing {
	display: grid;
	gap: clamp(28px, 5vw, 72px);
	max-inline-size: 1200px;
	margin-inline: auto;
	padding: clamp(16px, 3vw, 40px) var(--lx-gutter) clamp(24px, 4vw, 56px);
}

.lx-hero {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	grid-template-areas: "body art" "floor art";
	grid-template-rows: auto auto;
	column-gap: clamp(20px, 3vw, 48px);
	isolation: isolate;
}
/* The floor the kitten sits on: a band under the whole first screen. */
.lx-hero::after {
	content: "";
	position: absolute;
	z-index: -2;
	inset-inline: 0;
	inset-block-end: 0;
	block-size: clamp(56px, 9vw, 110px);
	border-radius: var(--lx-radius);
	background: linear-gradient(to bottom, transparent, var(--lx-floor) 55%);
}
.lx-hero__body { grid-area: body; align-self: start; display: grid; gap: 18px; justify-items: start; padding-block-start: clamp(4px, 1.2vw, 16px); }
.lx-hero__title { margin: 0; font-weight: 800; font-size: clamp(38px, 4.6vw, 66px); line-height: 1.02; letter-spacing: -0.01em; overflow-wrap: break-word; text-wrap: balance; }
.lx-hero__accent { display: block; color: var(--lx-accent-strong); }
.lx-hero__text { margin: 0; font-size: clamp(18px, 1.7vw, 23px); color: var(--lx-ink-2); max-inline-size: 30em; }
.lx-hero__note { margin: 0; font-size: 15px; color: var(--lx-ink-3); }

.lx-hero__art { grid-area: art; position: relative; display: grid; place-items: center; padding-block: 0 clamp(40px, 6vw, 80px); }
/* Soft blob behind the phones. */
.lx-hero__art::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: 8% 4% 18% 10%;
	border-radius: 58% 42% 52% 48% / 48% 56% 44% 52%;
	background: var(--lx-peach);
}
.lx-phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; inline-size: 100%; max-inline-size: 640px; }
.lx-phone {
	margin: 0;
	padding: clamp(4px, 0.55vw, 8px);
	border-radius: clamp(20px, 2.4vw, 34px);
	background: var(--lx-device);
	box-shadow: 0 0 0 1px var(--lx-device-edge), var(--lx-device-shadow);
	transition: transform 0.45s cubic-bezier(.3, 1.4, .5, 1);
}
.lx-phone img { display: block; inline-size: 100%; block-size: auto; border-radius: clamp(16px, 1.9vw, 27px); }
.lx-phone--room { position: relative; z-index: 1; transform: rotate(-6deg) translate(14%, 3%); }
.lx-phone--lesson { position: relative; z-index: 2; transform: translateY(9%) scale(1.06); }
.lx-phone--levelup { position: relative; z-index: 1; transform: rotate(6deg) translate(-14%, -1%); }
.lx-hero__art:hover .lx-phone--room { transform: rotate(-8deg) translate(8%, 1%); }
.lx-hero__art:hover .lx-phone--lesson { transform: translateY(5%) scale(1.08); }
.lx-hero__art:hover .lx-phone--levelup { transform: rotate(8deg) translate(-8%, -3%); }
[dir="rtl"] .lx-phone--room { transform: rotate(6deg) translate(-14%, 3%); }
[dir="rtl"] .lx-phone--levelup { transform: rotate(-6deg) translate(14%, -1%); }

.lx-hero__floor { grid-area: floor; align-self: end; display: flex; align-items: flex-end; gap: clamp(8px, 2vw, 28px); padding-inline-start: clamp(0px, 2vw, 24px); margin-block-start: 4px; }
.lx-hero__kitten { inline-size: clamp(110px, 10vw, 150px); block-size: auto; transform-origin: 50% 100%; animation: lx-kitten-breathe 4s ease-in-out infinite; }
.lx-hero__ball { inline-size: clamp(36px, 3.4vw, 52px); block-size: auto; margin-block-end: 8px; }
@keyframes lx-kitten-breathe {
	0%, 100% { transform: scale(1, 1); }
	50% { transform: scale(1.015, 0.985); }
}

.lx-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.lx-cta__soon { white-space: normal; font-size: 14px; padding: 0.5em 1em; }

/* Mini-lesson — mockup site-lexitail-landing-en-2.png: the question on the left, the
   picture card and the kitten that reacts on the right. */
.lx-sprite { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; }
.lx-eyebrow--accent { color: var(--lx-accent-strong); }

.lx-quiz {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(20px, 4vw, 56px);
	isolation: isolate;
}
.lx-quiz__body { display: grid; gap: 18px; justify-items: start; }
.lx-quiz__question { margin: 0; font-size: clamp(30px, 4vw, 54px); font-weight: 800; line-height: 1.05; letter-spacing: -0.01em; text-wrap: balance; }
.lx-quiz__options { display: flex; flex-wrap: wrap; gap: 12px; }
.lx-quiz__option {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	min-block-size: 60px;
	padding: 0.5em 1.6em;
	border: 0;
	border-radius: 999px;
	background: var(--lx-surface-2);
	color: var(--lx-ink);
	font: 600 clamp(20px, 1.8vw, 24px)/1.2 var(--lx-font);
	box-shadow: var(--lx-shadow);
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.15s ease;
}
.lx-quiz__option:hover { transform: translateY(-2px); }
.lx-quiz__option:focus-visible { outline: none; box-shadow: var(--lx-focus); }
.lx-quiz__tick { display: none; inline-size: 1.1em; block-size: 1.1em; padding: 0.15em; border-radius: 50%; background: var(--lx-sage); color: var(--lx-on-accent); stroke-width: 3; }
.lx-quiz__option.is-right { background: var(--lx-sage-soft); color: var(--lx-ink); box-shadow: inset 0 0 0 2px var(--lx-sage); }
.lx-quiz__option.is-right .lx-quiz__tick { display: block; }
.lx-quiz__option.is-wrong { background: var(--lx-accent-soft); color: var(--lx-ink-3); transform: none; }
.lx-quiz__option:disabled { cursor: default; }
.lx-quiz__verdict { display: flex; align-items: center; gap: 0.5em; margin: 0; min-block-size: 1.6em; font-size: 19px; font-weight: 700; color: var(--lx-sage); }
.lx-quiz__verdict:empty { visibility: hidden; }
.lx-quiz__verdict::before { content: ""; inline-size: 1.3em; block-size: 1.3em; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='16.2' rx='5.6' ry='4.6'/%3E%3Ccircle cx='5.2' cy='10' r='2.4'/%3E%3Ccircle cx='9.4' cy='5.6' r='2.5'/%3E%3Ccircle cx='14.6' cy='5.6' r='2.5'/%3E%3Ccircle cx='18.8' cy='10' r='2.4'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cellipse cx='12' cy='16.2' rx='5.6' ry='4.6'/%3E%3Ccircle cx='5.2' cy='10' r='2.4'/%3E%3Ccircle cx='9.4' cy='5.6' r='2.5'/%3E%3Ccircle cx='14.6' cy='5.6' r='2.5'/%3E%3Ccircle cx='18.8' cy='10' r='2.4'/%3E%3C/svg%3E") center / contain no-repeat; }
[data-lt-tries]:not(:has(.is-right)) .lx-quiz__verdict { color: var(--lx-accent-strong); }
.lx-quiz__more { margin: 0; color: var(--lx-ink-2); max-inline-size: 32em; }

.lx-quiz__art { position: relative; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: end; gap: 0; }
.lx-quiz__art::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: 8% -4% 4% 6%;
	border-radius: 52% 48% 46% 54% / 56% 44% 56% 44%;
	background: var(--lx-peach);
}
.lx-quiz__card { display: grid; place-items: center; aspect-ratio: 1; padding: 12%; border-radius: var(--lx-radius); background: var(--lx-paper); box-shadow: var(--lx-paper-shadow-lift); transform: rotate(-4deg); }
.lx-quiz__card img { inline-size: 100%; block-size: auto; }
.lx-quiz__cat { margin-inline-start: -8%; }
.lx-quiz__cat img { inline-size: 100%; block-size: auto; transition: transform 0.35s cubic-bezier(.3, 1.6, .5, 1); transform-origin: 50% 100%; }
.lx-quiz__cat.is-happy img { transform: translateY(-14%) rotate(-6deg) scale(1.05); }
.lx-quiz__cat.is-sad img { transform: rotate(3deg) scale(0.96); }

.lx-section { display: grid; gap: 24px; }
.lx-section__title { margin: 0; font-size: clamp(28px, 3.4vw, 48px); font-weight: 800; line-height: 1.08; letter-spacing: -0.01em; }
.lx-section__title--center { text-align: center; }
.lx-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--lx-gap); margin: 0; padding: 0; list-style: none; }
.lx-card { position: relative; display: grid; align-content: start; gap: 10px; padding: var(--lx-pad); border-radius: var(--lx-radius); background: var(--lx-surface); box-shadow: var(--lx-shadow); }
.lx-card__title { margin: 0; font-size: clamp(22px, 2vw, 28px); font-weight: 800; }
.lx-card__text { margin: 0; color: var(--lx-ink-2); font-size: 17px; hyphens: auto; }

/* How it works: number in an accent disc, the title beside it. */
.lx-cards--steps { counter-reset: lx-step; }
.lx-cards--steps .lx-card { grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; row-gap: 6px; }
.lx-cards--steps .lx-card::before { counter-increment: lx-step; content: counter(lx-step); grid-row: span 2; display: grid; place-items: center; inline-size: 52px; block-size: 52px; border-radius: 50%; background: var(--lx-accent-strong); color: var(--lx-on-accent); font-size: 24px; font-weight: 800; }
.lx-cards--steps .lx-card__title { color: var(--lx-accent-strong); align-self: center; }

/* Reasons to come back: tinted cards with a mark in the corner. */
.lx-card--friends { background: var(--lx-teal-soft); }
.lx-card--streak { background: var(--lx-peach); }
.lx-card--plus { background: var(--lx-sage-soft); }
.lx-card__mark { position: absolute; inset-block-start: var(--lx-pad); inset-inline-end: var(--lx-pad); inline-size: 44px; block-size: 44px; }
.lx-card--friends .lx-card__mark { color: var(--lx-teal); }
.lx-card--plus .lx-card__mark { color: var(--lx-teal); fill: currentColor; }
.lx-card--friends .lx-card__title, .lx-card--plus .lx-card__title { padding-inline-end: 56px; }
.lx-paws { display: flex; flex-wrap: wrap; gap: 6px; }
.lx-paw { inline-size: 30px; block-size: 30px; fill: var(--lx-accent-strong); opacity: 0.25; }
.lx-paw.is-on { opacity: 1; }

/* Grammar lives on leximobile.com: a quiet centred banner. */
.lx-learnmore {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 20px clamp(20px, 4vw, 48px);
	padding: clamp(24px, 3.5vw, 44px) var(--lx-pad);
	border-radius: var(--lx-radius);
	background: var(--lx-surface-2);
	text-align: center;
}
.lx-learnmore__body { display: grid; gap: 6px; max-inline-size: 36em; }
.lx-learnmore .lx-section__title { font-size: clamp(24px, 2.6vw, 36px); }
.lx-btn--outline { background: transparent; color: var(--lx-accent-strong); box-shadow: inset 0 0 0 2px var(--lx-accent-strong); }
.lx-btn--outline:hover { background: var(--lx-accent-soft); }
[dir="rtl"] .lx-btn .lx-icon { transform: scaleX(-1); }

/* Final call: warm block, title and buttons on the left, the kitten on a striped rug. */
.lx-final {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 20px;
	padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 56px) 0;
	border-radius: var(--lx-radius);
	background: var(--lx-peach);
	overflow: hidden;
	isolation: isolate;
}
.lx-final__body { display: grid; gap: 20px; justify-items: start; padding-block-end: clamp(28px, 4vw, 48px); }
.lx-final .lx-section__title { font-size: clamp(32px, 4.4vw, 60px); }
.lx-final__art { position: relative; align-self: end; display: flex; align-items: flex-end; gap: 12px; padding-inline: 24px; }
.lx-final__art::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset-inline: -20%;
	inset-block-end: 0;
	block-size: 38%;
	border-radius: 50% 50% 0 0 / 30% 30% 0 0;
	background: repeating-linear-gradient(90deg, var(--lx-accent-soft) 0 18px, var(--lx-paper-mark) 18px 36px);
	opacity: 0.85;
}
.lx-final__kitten { inline-size: clamp(120px, 13vw, 190px); block-size: auto; margin-block-end: 8px; transform-origin: 50% 100%; animation: lx-kitten-breathe 4s ease-in-out infinite; }
.lx-final__ball { inline-size: clamp(40px, 4vw, 60px); block-size: auto; margin-block-end: 14px; }

/* FAQ set widget of the engine (default/site/widgets/faq.html): <details>, no Bootstrap.
   Mockup: the title on the left, the questions on the right (the mockup's kitten left
   out — the same picture already sits in the hero, the mini-lesson and the final). */
.lx-landing-faq { max-inline-size: 1200px; margin-inline: auto; padding-inline: var(--lx-gutter); }
.lx .lb-faq { display: grid; gap: 10px; }
.lx-landing-faq .lb-faq { grid-template-columns: minmax(0, 4fr) minmax(0, 9fr); column-gap: clamp(20px, 4vw, 56px); }
.lx-landing-faq .lb-faq .section-head { grid-row: 1 / span 10; align-self: start; position: sticky; inset-block-start: 96px; }
.lx-landing-faq .lb-faq__item { grid-column: 2; }
.lx .lb-faq .section-head h2 { margin: 0 0 10px; font-size: clamp(28px, 3.4vw, 48px); font-weight: 800; letter-spacing: -0.01em; }
.lx .lb-faq__item { padding: 16px 22px; border-radius: var(--lx-radius-sm); background: var(--lx-surface); box-shadow: inset 0 0 0 1px var(--lx-line); }
.lx .lb-faq__q { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-weight: 700; font-size: 18px; cursor: pointer; list-style: none; }
.lx .lb-faq__q::-webkit-details-marker { display: none; }
.lx .lb-faq__q::after { content: ""; flex: none; inline-size: 10px; block-size: 10px; border-inline-end: 2px solid var(--lx-accent-strong); border-block-end: 2px solid var(--lx-accent-strong); transform: translateY(-3px) rotate(45deg); transition: transform 0.2s ease; }
.lx .lb-faq__item[open] .lb-faq__q::after { transform: translateY(2px) rotate(-135deg); }
.lx .lb-faq__a { margin-block-start: 10px; color: var(--lx-ink-2); }
.lx .lb-faq__a > :last-child { margin-block-end: 0; }

@media (max-width: 860px) {
	.lx-hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "body" "art"; }
	.lx-hero::after, .lx-hero__floor { display: none; }
	.lx-hero__art { padding-block: 8px 28px; }
	.lx-phones { max-inline-size: 440px; }
	.lx-quiz { grid-template-columns: minmax(0, 1fr); }
	.lx-quiz__art { max-inline-size: 420px; justify-self: center; order: -1; }
	.lx-cards { grid-template-columns: minmax(0, 1fr); }
	.lx-final { grid-template-columns: minmax(0, 1fr); }
	.lx-final__art { justify-self: center; }
	.lx-landing-faq .lb-faq { grid-template-columns: minmax(0, 1fr); }
	.lx-landing-faq .lb-faq .section-head { grid-row: auto; }
	.lx-landing-faq .lb-faq__item { grid-column: 1; }
}

/* ---------- product pages (27 §3.4): reader, Frank text, flashcards, mini-lesson ---------- */

.lx-prod__answer { margin: 0 0 22px; padding: 14px 18px; border-inline-start: 4px solid var(--lx-accent); border-radius: var(--lx-radius-sm); background: var(--lx-surface); font-weight: 600; hyphens: auto; }
.lx-prod__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lx-prod__p { margin: 0 0 14px; color: var(--lx-ink-2); hyphens: auto; }
.lx-prod__note { margin: -6px 0 18px; }
.lx-prod__list { display: grid; gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; }
.lx-prod__list li { padding: 12px 16px; border-radius: var(--lx-radius-sm); background: var(--lx-surface-2); hyphens: auto; }
.lx-prod__list b { color: var(--lx-ink); }
.lx-prod__table { overflow-x: auto; margin: 0 0 14px; border-radius: var(--lx-radius-sm); box-shadow: var(--lx-shadow); }
.lx-prod__table table { inline-size: 100%; border-collapse: collapse; background: var(--lx-surface); }
.lx-prod__table th, .lx-prod__table td { padding: 10px 14px; border-block-end: 1px solid var(--lx-line); text-align: start; vertical-align: top; overflow-wrap: normal; }
/* a cell narrower than ~7em turns words into syllables: past that the table scrolls instead (four text columns at 390) */
.lx-prod__table td { min-inline-size: 7em; hyphens: auto; }
.lx-prod__table thead th, .lx-prod__table thead td { background: var(--lx-sage-soft); font-size: 15px; }
/* сравнение (макет site-versus-below.png): кружок с буквой вместо чужих логотипов,
   строка нашего продукта тёплая и с кнопкой */
.lx-prod__table tbody th { white-space: nowrap; }
.lx-prod__avatar { display: inline-grid; place-items: center; inline-size: 30px; block-size: 30px; margin-inline-end: 10px; border-radius: 9px; background: var(--lx-surface-2); color: var(--lx-ink-2); font-weight: 800; font-size: 15px; vertical-align: middle; }
.lx-prod__table tbody tr:nth-child(3n+1) .lx-prod__avatar { background: var(--lx-sage-soft); }
.lx-prod__table tbody tr:nth-child(3n+2) .lx-prod__avatar { background: var(--lx-teal-soft); }
.lx-prod__table tbody tr:nth-child(3n+3) .lx-prod__avatar { background: var(--lx-sand); }
.lx-prod__table tr.is-ours > * { background: var(--lx-accent-soft); }
.lx-prod__table tbody tr.is-ours .lx-prod__avatar { background: var(--lx-accent-strong); color: var(--lx-on-accent); }
.lx-prod__act { min-inline-size: 0 !important; vertical-align: middle !important; }
.lx-prod__act .lx-btn { gap: 6px; white-space: nowrap; }
/* «условие → что взять» — карточки в ряд */
.lx-prod__list--cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: var(--lx-gap); }
.lx-prod__list--cards li { display: grid; align-content: start; gap: 6px; padding: 18px 20px; background: var(--lx-surface); box-shadow: var(--lx-shadow); border-block-start: 4px solid var(--lx-accent); color: var(--lx-ink-2); }
.lx-prod__list--cards li:nth-child(3n+2) { border-block-start-color: var(--lx-teal); }
.lx-prod__list--cards li:nth-child(3n+3) { border-block-start-color: var(--lx-sage); }
.lx-prod__list--cards b { display: block; font-size: 18px; line-height: 1.3; }
.lx-prod__cta { padding: var(--lx-pad); border-radius: var(--lx-radius); background: var(--lx-accent-soft); }

/* a book page stays paper in both schemes (--lx-paper-*) */
.lx-rd, .lx-fr { position: relative; }
.lx-rd__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block-end: 14px; }
.lx-rd__bar[hidden] { display: none; }
.lx-rd__bar .lx-pill[aria-pressed="true"] { background: var(--lx-ink); color: var(--lx-bg); }
.lx-rd__page { padding: clamp(20px, 3vw, 40px); border-radius: var(--lx-radius-sm); background: var(--lx-paper); color: var(--lx-paper-ink); box-shadow: var(--lx-paper-shadow); font: 19px/1.65 var(--lx-font-book); }
.lx-rd__meta { margin: 0 0 18px; color: var(--lx-paper-ink-2); font: 600 15px/1.4 var(--lx-font); }
.lx-rd__para { margin-block-end: 18px; }
.lx-rd__src { margin: 0; }
.lx-rd__tr { margin: 6px 0 0; padding-inline-start: 12px; border-inline-start: 3px solid var(--lx-paper-mark); color: var(--lx-paper-ink-2); font: 16px/1.55 var(--lx-font); hyphens: auto; }
.lx-rd.is-live[data-mode="tap"] .lx-rd__tr:not(.is-open) { display: none; }
.lx-rd__toggle { margin-block-start: 4px; padding: 2px 0; border: 0; background: none; color: var(--lx-paper-ink-2); font: 600 14px/1.3 var(--lx-font); text-decoration: underline dotted; cursor: pointer; }
.lx-rd__toggle[hidden] { display: none; }
.lx-rd__w { display: inline; padding: 0; border: 0; border-block-end: 1px dashed var(--lx-paper-mark); background: none; color: inherit; font: inherit; cursor: pointer; }
.lx-rd__w:hover, .lx-rd__w.is-active { background: var(--lx-paper-mark); border-radius: 3px; }
.lx-rd:not(.is-live) .lx-rd__w { border-block-end: 0; cursor: text; }
.lx-rd__pop { position: absolute; z-index: 5; max-inline-size: min(320px, 100%); padding: 10px 14px; border-radius: var(--lx-radius-sm); background: var(--lx-paper-tip); color: var(--lx-paper-ink); box-shadow: var(--lx-paper-shadow-lift); font: 16px/1.4 var(--lx-font); }
.lx-rd__pop[hidden] { display: none; }

.lx-fr__passage + .lx-fr__passage { margin-block-start: 30px; padding-block-start: 24px; border-block-start: 1px solid var(--lx-paper-mark); }
.lx-fr__title { margin: 0 0 12px; font: 700 21px/1.3 var(--lx-font); }
.lx-fr__ru { color: var(--lx-paper-ink-2); font-weight: 600; }
.lx-fr__adapted { margin: 0; }
.lx-fr__hint { color: var(--lx-paper-ink-2); font: italic 0.88em/1.5 var(--lx-font); }
.lx-fr.is-plain .lx-fr__hint { display: none; }
.lx-fr__label { margin: 16px 0 6px; color: var(--lx-paper-ink-2); font: 700 14px/1.3 var(--lx-font); }
.lx-fr__plain { margin: 0; padding-inline-start: 12px; border-inline-start: 3px solid var(--lx-paper-mark); }
.lx-fr > h3 { margin: 32px 0 12px; font-size: 21px; }

/* reader of your own file: pick a book, then the same paper page as the story reader */
.lx-bk { position: relative; }
.lx-bk__pick { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: var(--lx-pad); border: 2px dashed var(--lx-line); border-radius: var(--lx-radius); background: var(--lx-surface); }
.lx-bk.is-drop .lx-bk__pick { border-color: var(--lx-accent); background: var(--lx-accent-soft); }
.lx-bk:not(.is-live) .lx-bk__pick { display: none; }
.lx-bk__pick[hidden], .lx-bk__book[hidden], .lx-bk__error[hidden], .lx-bk [data-lx-attribution][hidden] { display: none; }
.lx-bk__file { position: relative; cursor: pointer; }
.lx-bk__file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.lx-bk__file:focus-within { outline: 3px solid var(--lx-accent); outline-offset: 2px; }
.lx-bk__private { flex-basis: 100%; margin: 0; }
.lx-bk__error { margin: 12px 0; padding: 12px 16px; border-radius: var(--lx-radius-sm); background: var(--lx-accent-soft); color: var(--lx-ink); font-weight: 600; }
.lx-bk__field { display: inline-flex; align-items: center; gap: 8px; font: 600 15px/1.3 var(--lx-font); }
.lx-bk__field select { max-inline-size: 260px; padding: 6px 10px; border: 1px solid var(--lx-line); border-radius: var(--lx-radius-sm); background: var(--lx-surface); color: var(--lx-ink); font: inherit; }
.lx-bk__text { cursor: text; }
.lx-bk__p { margin: 0 0 14px; hyphens: auto; }
.lx-bk__head { margin: 20px 0 12px; font: 700 21px/1.3 var(--lx-font); }
.lx-bk__nav { display: flex; justify-content: space-between; gap: 10px; margin-block-start: 14px; }
.lx-bk__nav button:disabled { opacity: 0.4; cursor: default; }
.lx-bk__muted { color: var(--lx-paper-ink-2); }
.lx-bk__tag { display: inline-block; padding: 0 6px; border-radius: 999px; background: var(--lx-paper-mark); font-size: 13px; }
.lx-bk__pop a { color: var(--lx-accent-strong); font-weight: 700; }
::highlight(lx-tap) { background-color: var(--lx-paper-mark); }

/* flashcards: a paper card; without JS a grid of the whole deck */
.lx-fc__deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--lx-gap); margin: 0; padding: 0; list-style: none; }
.lx-fc__card { display: grid; justify-items: center; gap: 4px; padding: 14px; border-radius: var(--lx-radius-sm); background: var(--lx-paper); color: var(--lx-paper-ink); box-shadow: var(--lx-paper-shadow); text-align: center; }
.lx-fc__card[hidden] { display: none; }
.lx-fc__img { inline-size: 96px; block-size: 96px; object-fit: contain; }
.lx-fc__word { font-weight: 800; font-size: 20px; }
.lx-fc__gloss { color: var(--lx-paper-ink-2); }
.lx-fc__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-block-start: 14px; }
.lx-fc__actions[hidden], .lx-fc__actions [hidden] { display: none; }
.lx-fc__left { margin-inline-start: auto; color: var(--lx-ink-3); font-weight: 600; font-size: 15px; }
.lx-fc.is-live .lx-fc__deck { grid-template-columns: minmax(0, 420px); justify-content: center; }
.lx-fc.is-live .lx-fc__card { gap: 8px; min-block-size: 360px; align-content: center; padding: 28px 20px; box-shadow: var(--lx-paper-shadow-lift); }
.lx-fc.is-live .lx-fc__img { inline-size: 160px; block-size: 160px; }
.lx-fc.is-live .lx-fc__word { font-size: 32px; }
.lx-fc.is-live .lx-fc__gloss { font-size: 22px; }
.lx-fc.is-live[data-side="front"] .lx-fc__card:not(.is-flipped) .lx-fc__gloss,
.lx-fc.is-live[data-side="back"] .lx-fc__card:not(.is-flipped) .lx-fc__word { visibility: hidden; }

/* mini-lesson: the kitten asks, three pictures */
.lx-ls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 220px); gap: var(--lx-gap); align-items: start; padding: var(--lx-pad); border-radius: var(--lx-radius); background: var(--lx-sand); }
.lx-ls__cat { grid-column: 2; grid-row: 1 / span 2; }
.lx-ls__cat img { inline-size: 100%; block-size: auto; transform-origin: 50% 100%; }
.lx-ls__cat img.is-happy { animation: lx-purr 0.6s ease; }
.lx-ls__cat img.is-sad { animation: lx-shake 0.5s ease; }
.lx-ls__tasks { grid-column: 1; display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }
.lx-ls__task[hidden] { display: none; }
.lx-ls__ask { margin: 0 0 12px; font-size: 21px; }
.lx-ls__ask b { color: var(--lx-accent-strong); font-size: 1.25em; }
.lx-ls__options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lx-ls__option { padding: 10px; border: 3px solid transparent; border-radius: var(--lx-radius-sm); background: var(--lx-paper); box-shadow: var(--lx-paper-shadow); cursor: pointer; }
.lx-ls__option img { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 1; object-fit: contain; }
.lx-ls__option:hover:not(:disabled) { box-shadow: var(--lx-paper-shadow-lift); }
.lx-ls__option:disabled { cursor: default; }
.lx-ls__option.is-right { border-color: var(--lx-sage); }
.lx-ls__option.is-wrong { border-color: var(--lx-accent-strong); opacity: 0.7; }
.lx-ls__task[data-state="right"] .lx-ex__verdict { color: var(--lx-sage); }
.lx-ls__task[data-state="wrong"] .lx-ex__verdict { color: var(--lx-accent-strong); }
.lx-ls .lx-ex__result { grid-column: 1; }
@keyframes lx-purr { 50% { transform: scale(1.06) rotate(-3deg); } }
@keyframes lx-shake { 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }

@media (max-width: 620px) {
	.lx-ls { grid-template-columns: minmax(0, 1fr); }
	.lx-ls__cat { grid-column: 1; grid-row: auto; justify-self: end; inline-size: 110px; }
	.lx-ls__tasks, .lx-ls .lx-ex__result { grid-column: 1; }
	.lx-rd__page { font-size: 18px; }
	.lx-bk__field { flex-basis: 100%; justify-content: space-between; }
	.lx-bk__field select { flex: 1; }
}

/* Тест словарного запаса (lexi/site/vocab-test/page.html, vocab-test.js). Шаги — панели
   одной карточки; слова шага 1 — плитки-флажки сеткой, от частых к редким. */
.lx-vt__box { display: grid; gap: 14px; padding: var(--lx-pad); border-radius: var(--lx-radius); background: var(--lx-surface); box-shadow: var(--lx-shadow-lift); }
.lx-vt__box [hidden] { display: none !important; }
.lx-vt__panel { display: grid; gap: 14px; }
.lx-vt__panel > * { margin: 0; }
.lx-vt__title { margin: 0; font-size: clamp(22px, 2.2vw, 28px); }
.lx-vt__title:focus { outline: none; }
.lx-vt__hint { color: var(--lx-ink-2); }
.lx-vt__last { font-weight: 600; color: var(--lx-teal); }
.lx-vt__progress { block-size: 6px; border-radius: 999px; background: var(--lx-line); overflow: hidden; }
.lx-vt__progress span { display: block; block-size: 100%; inline-size: 0; border-radius: inherit; background: var(--lx-accent); transition: inline-size 0.3s ease; }
.lx-vt__words { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.lx-vt__word { display: flex; align-items: center; gap: 10px; min-block-size: 48px; padding: 8px 14px; border: 1px solid var(--lx-line); border-radius: var(--lx-radius-sm); background: var(--lx-bg); font-size: 18px; font-weight: 600; cursor: pointer; user-select: none; }
.lx-vt__word:hover { border-color: var(--lx-ink-3); }
.lx-vt__word span { min-inline-size: 0; hyphens: auto; -webkit-hyphens: auto; }
.lx-vt__word input { inline-size: 20px; block-size: 20px; margin: 0; accent-color: var(--lx-accent); flex: none; }
.lx-vt__word:has(input:checked) { border-color: var(--lx-accent); background: var(--lx-accent-soft); }
.lx-vt__word:has(input:focus-visible) { box-shadow: var(--lx-focus); }
.lx-vt__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.lx-vt__count { color: var(--lx-ink-3); font-weight: 600; }
.lx-vt__step { color: var(--lx-ink-3); font-weight: 600; }
.lx-vt__question { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
.lx-vt__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lx-vt__options .lx-ex__option { border-radius: var(--lx-radius-sm); text-align: start; }
.lx-vt__options .lx-ex__option.is-right { background: var(--lx-good-soft); border-color: var(--lx-good); }
.lx-vt__options .lx-ex__option.is-wrong { background: var(--lx-bad-soft); border-color: var(--lx-bad); }
.lx-vt__panel .lx-ex__skip { justify-self: start; }
.lx-vt__score { margin: 0; font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; }
.lx-vt__score:focus { outline: none; }
.lx-vt__score b { font-size: clamp(48px, 7vw, 76px); font-weight: 800; color: var(--lx-accent-strong); line-height: 1; }
.lx-vt__score small { font-size: 0.7em; font-weight: 600; color: var(--lx-ink-3); }
.lx-vt__level { font-size: 19px; font-weight: 600; }
.lx-vt__warn { padding: 10px 14px; border-radius: var(--lx-radius-sm); background: var(--lx-accent-soft); }
.lx-vt__result h3 { margin: 10px 0 0; font-size: 20px; }
.lx-vt__bands { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.lx-vt__bands li { display: grid; grid-template-columns: 112px minmax(0, 1fr) 44px; align-items: center; gap: 10px; }
.lx-vt__band-name { color: var(--lx-ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lx-vt__band-bar { block-size: 12px; border-radius: 999px; background: var(--lx-line); overflow: hidden; }
.lx-vt__band-bar i { display: block; block-size: 100%; border-radius: inherit; background: var(--lx-teal); }
.lx-vt__band-pct { text-align: end; font-weight: 600; font-variant-numeric: tabular-nums; }
.lx-vt__learn { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
.lx-vt__learn b { color: var(--lx-teal); }
.lx-vt__learn span { color: var(--lx-ink-2); }
.lx-vt__sources { margin-block: 0; }

@media (max-width: 520px) {
	.lx-vt__words { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lx-vt__options { grid-template-columns: minmax(0, 1fr); }
	.lx-vt__bands { font-size: 12.5px; }
	.lx-vt__bands li { grid-template-columns: 96px minmax(0, 1fr) 36px; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
	.lx *, .lx *::before, .lx *::after { transition: none !important; animation: none !important; }
}

/* Тест уровня (lexi/site/level-test/page.html, level-test.js) — на каркасе теста словаря. */
.lx-lt__self, .lx-lt__options { display: grid; gap: 10px; }
.lx-lt__self .lx-ex__option, .lx-lt__options .lx-ex__option { border-radius: var(--lx-radius-sm); text-align: start; }
.lx-lt__passage { padding: 14px 16px; border-radius: var(--lx-radius-sm); background: var(--lx-bg); line-height: 1.5; }
.lx-lt__listen { justify-self: start; }
.lx-lt__question { margin: 0; font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; }
.lx-lt__question:focus { outline: none; }
.lx-lt__skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.lx-lt__skills li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: var(--lx-radius-sm); background: var(--lx-bg); }
.lx-lt__skills b { color: var(--lx-accent-strong); }
.lx-lt__weak { margin: 0; padding-inline-start: 1.2em; }
.lx-result .lx-vt__box { margin-block: 24px; }

/* Слова по темам (lexi/site/words/*, words.js; макет design/references/site-topic-food.png). */
.lx-wd__topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: var(--lx-gap); margin: 0; padding: 0; list-style: none; }
.lx-wd__topic { display: grid; gap: 4px; block-size: 100%; padding: 18px 20px; border-radius: var(--lx-radius-sm); background: var(--lx-surface); box-shadow: var(--lx-shadow); color: var(--lx-ink); text-decoration: none; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.lx-wd__topic:hover { box-shadow: var(--lx-shadow-lift); transform: translateY(-1px); }
.lx-wd__topic b { font-size: 19px; }
.lx-wd__meta { color: var(--lx-ink-3); font-size: 14px; }
.lx-wd__preview { color: var(--lx-ink-2); font-size: 15px; }
.lx-wd__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-block-start: 16px; }
.lx-wd__layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: clamp(20px, 3vw, 40px); }
.lx-wd__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 165px), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.lx-wd__card { position: relative; display: grid; gap: 8px; padding: 14px; border-radius: var(--lx-radius-sm); background: var(--lx-surface); box-shadow: var(--lx-shadow); }
.lx-wd__card.is-playing { box-shadow: 0 0 0 2px var(--lx-accent); }
.lx-wd__card img { inline-size: 100%; max-inline-size: 150px; block-size: auto; aspect-ratio: 1; margin-inline: auto; object-fit: contain; }
.lx-wd__text { display: grid; gap: 2px; padding-inline-end: 34px; overflow-wrap: anywhere; }
.lx-wd__text b { font-size: 18px; }
.lx-wd__text span { color: var(--lx-ink-2); font-size: 15px; }
.lx-wd__say { position: absolute; inset-block-end: 10px; inset-inline-end: 10px; display: grid; place-items: center; inline-size: 40px; block-size: 40px; border: 0; border-radius: 50%; background: var(--lx-surface-2); color: var(--lx-ink); cursor: pointer; }
.lx-wd__say:hover { background: var(--lx-accent-soft); }
.lx-wd__say:focus-visible { outline: none; box-shadow: var(--lx-focus); }
.lx-wd__grid--plain .lx-wd__card { padding-block: 10px; }
.lx-wd__columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lx-wd__column { display: grid; align-content: start; gap: 8px; }
.lx-wd__column .lx-ex__option { inline-size: 100%; border-radius: var(--lx-radius-sm); overflow-wrap: anywhere; }
.lx-wd__column .lx-ex__option.is-picked { border-color: var(--lx-accent); background: var(--lx-accent-soft); }
.lx-wd__column .lx-ex__option.is-wrong { border-color: var(--lx-bad); background: var(--lx-bad-soft); }
.lx-wd__column .lx-ex__option.is-done { border-color: var(--lx-good); background: var(--lx-good-soft); color: var(--lx-ink-2); }
.lx-wd__aside { position: sticky; inset-block-start: 96px; max-block-size: calc(100vh - 120px); padding: 18px; border-radius: var(--lx-radius-sm); background: var(--lx-surface); box-shadow: var(--lx-shadow); overflow-y: auto; }
.lx-wd__aside h2 { margin: 0 0 8px; font-size: 13px; }
.lx-wd__aside ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.lx-wd__aside a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 6px; border-radius: 8px; color: var(--lx-ink); font-size: 15px; text-decoration: none; }
.lx-wd__aside a:hover { background: var(--lx-surface-2); }
.lx-wd__aside b { font-weight: 500; }
.lx-wd__aside span { flex: none; color: var(--lx-ink-3); font-size: 13px; }
@media (max-width: 900px) {
	.lx-wd__layout { grid-template-columns: minmax(0, 1fr); }
	.lx-wd__aside { position: static; max-block-size: none; }
}

/* Тексты и диалоги (lexi/site/reading/*, плеер words.js). */
.lx-rl__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 6px 24px; margin: 0; padding: 0; list-style: none; }
.lx-rl__lines { display: grid; gap: 10px; max-inline-size: 760px; margin: 0; padding: 0; list-style: none; }
.lx-rl__line { position: relative; padding: 14px 60px 14px 18px; border-radius: var(--lx-radius-sm); background: var(--lx-surface); box-shadow: var(--lx-shadow); }
.lx-rl__line.is-playing { box-shadow: 0 0 0 2px var(--lx-accent); }
.lx-rl__line > p { margin: 0; }
.lx-rl__who { display: block; margin-block-end: 2px; color: var(--lx-teal); font-size: 13px; font-weight: 600; }
.lx-rl__w { font-size: 19px; font-weight: 600; }
.lx-rl__tr { color: var(--lx-ink-2); font-size: 16px; }
.lx-rl--no-tr .lx-rl__tr { visibility: hidden; }
.lx-rl [data-lx-tr-toggle][aria-pressed="true"] { background: var(--lx-ink); color: var(--lx-bg); }
.lx-rl__region:not([hidden]) { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.lx-rl__region .lx-pill[aria-pressed="true"] { background: var(--lx-ink); color: var(--lx-bg); }
.lx-rl .lx-wd__say { inset-block: 0; margin-block: auto; }
.lx-rl__nav { display: flex; flex-wrap: wrap; gap: 10px; margin-block: var(--lx-gap); }
