/**
 * MicroLearn Academy — polished, RTL, Duolingo-inspired design system.
 */

/* =====================================================================
   DESIGN TOKENS — the only place in the academy where raw colours live.

   Light values sit on :root, dark values on html[data-theme="dark"].
   Every component rule below reads these semantic tokens, so a new
   component that uses them follows light/dark automatically. Never write a
   hex/rgb value in a component rule: add or reuse a token here instead.
   ===================================================================== */
:root {
	/* Surfaces */
	--ml-bg: #fbfcfb;                 /* page */
	--ml-surface: #ffffff;            /* cards, panels */
	--ml-surface-2: #eef1f6;          /* soft fills: chips, tracks, inputs */
	--ml-surface-3: #e9eef6;          /* progress tracks, rings */
	--ml-surface-raised: #ffffff;     /* popovers, dialogs, sticky bars */
	--ml-surface-hover: #f0f3f8;      /* hover fill on neutral controls */
	--ml-surface-sunken: #fbfcfe;     /* text inputs */
	--ml-glass: color-mix(in srgb, #ffffff 92%, transparent); /* chips over images */
	--ml-chrome-bg: #fff8f1;          /* academy header / footer */
	--ml-chrome-line: #f1e2d3;

	/* Text */
	--ml-text: #222222;
	--ml-text-2: #34405a;
	--ml-text-muted: #6f7b91;
	--ml-text-faint: #7d8696;         /* still >= 3:1 on surfaces */

	/* Borders and edges */
	--ml-border: #e7e9e7;
	--ml-border-strong: #dfe4ec;
	--ml-edge: #d9dfe9;               /* 3D bottom edge under neutral buttons */
	--ml-scrollbar: #dbe0ea;

	/* Accent: the site brand. Follows Theme Settings (the theme prints --ms-*). */
	--ml-accent: var(--ms-green, #f97316);
	--ml-accent-hover: var(--ms-green-hover, #ea580c);
	--ml-accent-strong: #ea580c;      /* deep stop in accent gradients */
	--ml-accent-2: #fb923c;           /* lighter stop */
	--ml-accent-3: #ffb066;           /* lightest stop */
	--ml-accent-shade: #c2410c;       /* 3D sides, edges under accent buttons */
	--ml-accent-deep: #9a3412;
	--ml-accent-ink: var(--ms-green-ink, #c2410c); /* accent text on surfaces */
	--ml-accent-soft: var(--ms-green-soft, #fff1e5);
	--ml-on-accent: var(--ms-accent-ink, #2b1105); /* text on accent fills */

	/* Info (current step, labs, links in lessons) */
	--ml-info: #1cb0f6;
	--ml-info-2: #37c8ff;
	--ml-info-shade: #1188c4;
	--ml-info-ink: #0e7fb8;
	--ml-info-soft: #e8f6ff;
	--ml-info-line: #c9e9fa;
	--ml-on-info: #06202e;

	/* Success */
	--ml-success: #16a34a;
	--ml-success-shade: #15803d;
	--ml-success-light: #a6e168;
	--ml-success-ink: #15803d;
	--ml-success-bg: #f1fce6;
	--ml-success-fg: #2f6b00;
	--ml-success-border: #cdeab0;
	--ml-on-success: #ffffff;

	/* Danger */
	--ml-danger: #ff4b4b;
	--ml-danger-ink: #b42318;
	--ml-danger-bg: #fff2f2;
	--ml-danger-fg: #b42318;
	--ml-danger-border: #ffd2d2;

	/* Warning / gold */
	--ml-warning: #ffc800;
	--ml-warning-2: #ffb020;
	--ml-warning-ink: #8a6400;
	--ml-warning-bg: #fff8e1;
	--ml-warning-fg: #7a5b00;
	--ml-warning-border: #ffe2a8;

	/* Game and celebration colours */
	--ml-heart: #e11d48;
	--ml-streak: #c2410c;
	--ml-violet: #7c6bf5;
	--ml-violet-2: #6a56e8;
	--ml-gold-1: #fde68a;
	--ml-gold-2: #f59e0b;
	--ml-gold-shade: #b45309;
	--ml-gold-ink: #7c2d12;
	--ml-stone: #78716c;
	--ml-level-easy: #22a06b;
	--ml-level-medium: #e99b20;
	--ml-level-hard: #e05a5a;
	--ml-disabled-bg: #eff1f5;
	--ml-disabled-fg: #8b93a3;

	/* Coloured bands (hero strips) and imagery */
	--ml-on-band: #ffffff;            /* text and glass on coloured bands */
	--ml-band-shade: #0d3f6d;         /* mixed into course colour for hero bands */
	--ml-hero-1: #7c2d12;             /* course map hero gradient */
	--ml-hero-2: #c2410c;
	--ml-hero-3: #ea580c;
	--ml-on-track: #ffffff;           /* text on a course (track) colour */
	--ml-track-shade: #1a0f08;        /* deepens a course colour behind white text */
	--ml-media-bg: #000000;
	--ml-cover-bg: #0e1726;
	--ml-cover-scrim: #08101e;
	--ml-highlight: #ffffff;          /* gloss on 3D faces */
	--ml-shade: #000000;              /* darkening mixes */
	--ml-glow-2: color-mix(in srgb, #1cb0f6 7%, transparent);
	--ml-glow-strength: 10%;

	/* Shadows */
	--ml-shadow-color: #142037;
	--ml-shadow-warm: #7c2d12;
	--ml-scrim: #140c06;
	--ml-shadow-sm: 0 2px 6px color-mix(in srgb, var(--ml-shadow-color) 5%, transparent);
	--ml-shadow: 0 12px 30px -14px color-mix(in srgb, var(--ml-shadow-color) 28%, transparent);
	--ml-shadow-lg: 0 26px 60px -28px color-mix(in srgb, var(--ml-shadow-color) 42%, transparent);
	--ml-shadow-card: 0 30px 60px -36px color-mix(in srgb, var(--ml-shadow-warm) 45%, transparent);

	/* Focus */
	--ml-focus-ring: color-mix(in srgb, var(--ml-accent) 45%, transparent);

	/* Code: editor, code blocks, console, solutions. Light editor in light mode. */
	--ml-code-bg: #fffcf8;
	--ml-code-bar: #f6ece2;
	--ml-code-bar-fg: #5c4a3c;
	--ml-code-border: #eadccf;
	--ml-code-fg: #2c2118;
	--ml-code-muted: #6f5a4a;
	--ml-code-gutter-bg: #faf2ea;
	--ml-code-gutter-fg: #9a7f6b;
	--ml-code-selection: color-mix(in srgb, #3b82f6 24%, transparent);
	--ml-code-caret: #c2410c;
	--ml-code-focus: color-mix(in srgb, var(--ml-accent) 55%, transparent);
	--ml-code-comment: #8a7462;
	--ml-code-keyword: #9333ea;
	--ml-code-string: #15803d;
	--ml-code-number: #c2410c;
	--ml-code-function: #0369a1;
	--ml-code-class: #b45309;
	--ml-code-builtin: #0f766e;
	--ml-code-property: #0e7490;
	--ml-code-operator: #6b5a4b;
	--ml-code-punctuation: #7a6858;
	--ml-code-decorator: #be185d;
	--ml-code-variable: #b91c1c;
	--ml-code-ok: #15803d;
	--ml-code-warn: #a16207;
	--ml-code-error: #b42318;
	--ml-code-btn-bg: #fffaf4;
	--ml-code-btn-hover: #f1e3d6;
	--ml-code-inline-bg: #f7ece1;
	--ml-code-inline-fg: #0b3d5c;
	--ml-code-inline-border: #ecdccd;
	--ml-code-dot-1: #ff5f57;
	--ml-code-dot-2: #febc2e;
	--ml-code-dot-3: #28c840;
	--ml-code-shadow: 0 16px 34px -24px color-mix(in srgb, var(--ml-shadow-warm) 45%, transparent);

	/* Confetti (read by academy.js) */
	--ml-confetti-1: #f97316;
	--ml-confetti-2: #facc15;
	--ml-confetti-3: #38bdf8;
	--ml-confetti-4: #a3e635;
	--ml-confetti-5: #fb7185;
	--ml-confetti-6: #c084fc;
}

html[data-theme="dark"] {
	--ml-bg: #080605;
	--ml-surface: #291d16;
	--ml-surface-2: #2e2119;
	--ml-surface-3: #3a2a1e;
	--ml-surface-raised: #31241b;
	--ml-surface-hover: #33261d;
	--ml-surface-sunken: #1b1410;
	--ml-glass: color-mix(in srgb, #120d0a 84%, transparent);
	--ml-chrome-bg: #120d0a;
	--ml-chrome-line: #2b1d13;

	--ml-text: #fdf0e3;
	--ml-text-2: #e6d3c2;
	--ml-text-muted: #a4907f;
	--ml-text-faint: #8f7a69;

	--ml-border: #42301f;
	--ml-border-strong: #4a3726;
	--ml-edge: #1a120d;
	--ml-scrollbar: #45321f;

	--ml-accent: var(--ms-green, #fa954e);
	--ml-accent-hover: #fdba74;
	--ml-accent-strong: #ea580c;
	--ml-accent-2: #fdba74;
	--ml-accent-3: #fed7aa;
	--ml-accent-shade: #c2410c;
	--ml-accent-deep: #9a3412;
	--ml-accent-ink: var(--ms-green-ink, #fdba74);
	--ml-accent-soft: #3b2412;
	--ml-on-accent: var(--ms-accent-ink, #2b1105);

	--ml-info: #38bdf8;
	--ml-info-2: #7dd3fc;
	--ml-info-shade: #0369a1;
	--ml-info-ink: #7dd3fc;
	--ml-info-soft: #11283a;
	--ml-info-line: #1d4a66;
	--ml-on-info: #06202e;

	--ml-success: #22c55e;
	--ml-success-shade: #166534;
	--ml-success-light: #3f7a1e;
	--ml-success-ink: #4ade80;
	--ml-success-bg: #14301c;
	--ml-success-fg: #bbf7d0;
	--ml-success-border: #1f6b3d;
	--ml-on-success: #052e16;

	--ml-danger: #f87171;
	--ml-danger-ink: #fca5a5;
	--ml-danger-bg: #3a1616;
	--ml-danger-fg: #fecaca;
	--ml-danger-border: #7f1d1d;

	--ml-warning: #fbbf24;
	--ml-warning-2: #f59e0b;
	--ml-warning-ink: #fcd34d;
	--ml-warning-bg: #33280e;
	--ml-warning-fg: #fde68a;
	--ml-warning-border: #6b5314;

	--ml-heart: #fb7185;
	--ml-streak: #fdba74;
	--ml-violet: #8b7cf8;
	--ml-violet-2: #6a56e8;
	--ml-stone: #a8a29e;
	--ml-disabled-bg: #2a1e16;
	--ml-disabled-fg: #8a7568;

	--ml-band-shade: #0a2a48;
	--ml-cover-bg: #0e0a08;
	--ml-glow-2: color-mix(in srgb, #f97316 14%, transparent);
	--ml-glow-strength: 16%;

	--ml-shadow-color: #000000;
	--ml-shadow-warm: #000000;
	--ml-scrim: #000000;
	--ml-shadow-sm: 0 2px 6px color-mix(in srgb, var(--ml-shadow-color) 40%, transparent);
	--ml-shadow: 0 12px 30px -14px color-mix(in srgb, var(--ml-shadow-color) 65%, transparent);
	--ml-shadow-lg: 0 26px 60px -28px color-mix(in srgb, var(--ml-shadow-color) 80%, transparent);
	--ml-shadow-card: 0 30px 60px -36px color-mix(in srgb, var(--ml-shadow-warm) 90%, transparent);

	--ml-focus-ring: color-mix(in srgb, var(--ml-accent) 55%, transparent);

	--ml-code-bg: #17110d;
	--ml-code-bar: #221912;
	--ml-code-bar-fg: #cdb8a6;
	--ml-code-border: #3a2a1e;
	--ml-code-fg: #f3e6d8;
	--ml-code-muted: #b39d8b;
	--ml-code-gutter-bg: #130e0b;
	--ml-code-gutter-fg: #8f7866;
	--ml-code-selection: color-mix(in srgb, #60a5fa 34%, transparent);
	--ml-code-caret: #fdba74;
	--ml-code-comment: #a08a78;
	--ml-code-keyword: #d8b4fe;
	--ml-code-string: #86efac;
	--ml-code-number: #fdba74;
	--ml-code-function: #7dd3fc;
	--ml-code-class: #fcd34d;
	--ml-code-builtin: #5eead4;
	--ml-code-property: #67e8f9;
	--ml-code-operator: #d6c3b2;
	--ml-code-punctuation: #b8a493;
	--ml-code-decorator: #f9a8d4;
	--ml-code-variable: #fca5a5;
	--ml-code-ok: #4ade80;
	--ml-code-warn: #fbbf24;
	--ml-code-error: #fca5a5;
	--ml-code-btn-bg: #2a1e16;
	--ml-code-btn-hover: #3b2a1e;
	--ml-code-inline-bg: color-mix(in srgb, #ffffff 8%, transparent);
	--ml-code-inline-fg: #fde3c8;
	--ml-code-inline-border: #45321f;
	--ml-code-shadow: 0 16px 34px -24px color-mix(in srgb, #000000 80%, transparent);
}

/* The lesson player and paywall use a warmer, quieter palette. Same token
   names, different values: nothing else changes for these views. */
.ml-lesson-view,
.ml-paywall-view {
	--ml-bg: #fffaf4;
	--ml-surface: #fffdfa;
	--ml-surface-2: #f7ece1;
	--ml-surface-3: #f5e3d3;
	--ml-surface-hover: #ffe9d8;
	--ml-text: #2c2118;
	--ml-text-2: #4b3a2b;
	--ml-text-muted: #8b7460;
	--ml-text-faint: #977d68;
	--ml-border: #f0e0d1;
	--ml-border-strong: #ead8c6;
	--ml-edge: #ead3bf;
	--ml-scrollbar: #ead8c6;
	--ml-course: var(--ml-accent);
	--ml-glow-2: color-mix(in srgb, #facc15 10%, transparent);
}

html[data-theme="dark"] .ml-lesson-view,
html[data-theme="dark"] .ml-paywall-view {
	--ml-bg: #120d0a;
	--ml-surface: #1d1510;
	--ml-surface-2: #2a1e16;
	--ml-surface-3: #3a2a1e;
	--ml-surface-raised: #241a13;
	--ml-surface-hover: #2f2219;
	--ml-text: #fdf0e3;
	--ml-text-2: #ead7c5;
	--ml-text-muted: #b9a08b;
	--ml-text-faint: #9a8371;
	--ml-border: #3a2a1e;
	--ml-border-strong: #45321f;
	--ml-edge: #23160c;
	--ml-scrollbar: #45321f;
	--ml-glow-2: transparent;
}

/* Derived tokens and the legacy names (older rules, templates and the theme
   still say --ml-white, --ml-ink, --ml-green ...). Declared on every .ml-app as
   well as :root, so they pick up the scoped values above. */
:root,
.ml-app {
	--ml-accent-line: color-mix(in srgb, var(--ml-accent) 28%, var(--ml-border));
	--ml-course: var(--ml-accent);
	--ml-radius: 22px;

	--ml-white: var(--ml-surface);
	--ml-ink: var(--ml-text);
	--ml-ink-2: var(--ml-text-2);
	--ml-muted: var(--ml-text-muted);
	--ml-line: var(--ml-border);
	--ml-line-2: var(--ml-border-strong);
	--ml-soft: var(--ml-surface-2);
	--ml-green: var(--ml-accent);
	--ml-green-dark: var(--ml-accent-ink);
	--ml-green-soft: var(--ml-accent-soft);
	--ml-blue: var(--ml-info);
	--ml-blue-dark: var(--ml-info-shade);
	--ml-gold: var(--ml-warning);
	--ml-red: var(--ml-danger);
	--ml-purple: var(--ml-violet);
	--ml-soft-blue: var(--ml-info-soft);
	--ml-soft-green: var(--ml-success-bg);
	--ml-soft-red: var(--ml-danger-bg);
	--ml-soft-gold: var(--ml-warning-bg);
}

/* Course and lesson views pin the course colour to the brand accent. */
.ml-lesson-view,
.ml-paywall-view { --ml-course: var(--ml-accent); }

.ml-app {
	background:
		radial-gradient(900px 380px at 100% -10%, color-mix(in srgb, var(--ml-course) var(--ml-glow-strength), transparent), transparent 70%),
		radial-gradient(700px 320px at 0% 0%, var(--ml-glow-2), transparent 70%),
		var(--ml-bg);
	color: var(--ml-text);
	padding: 30px 0 72px;
	min-height: 60vh;
	direction: rtl;
	font-family: inherit;
	-webkit-font-smoothing: antialiased;
}

.ml-shell { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

.ml-academy .page-title,
.ml-academy .page-title-wrap,
.ml-academy .page-title-v3,
.ml-academy .breadcrumbs,
.ml-academy .page-head { display: none; }

.ml-app h1, .ml-app h2, .ml-app h3, .ml-app h4 { color: var(--ml-text); margin: 0; }
.ml-app p { margin: 0; }
.ml-app a { text-decoration: none; }
.ml-muted { color: var(--ml-text-muted); }
.ml-eyebrow {
	display: inline-flex; align-items: center; gap: 8px;
	font-size: 12.5px; font-weight: 800; letter-spacing: .04em;
	color: var(--ml-accent-ink); background: var(--ml-accent-soft);
	border-radius: 999px; padding: 6px 14px; margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.ml-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	border: 0; border-radius: 15px; padding: 11px 22px;
	font: inherit; font-weight: 800; cursor: pointer; text-decoration: none;
	background: var(--ml-surface-2); color: var(--ml-text);
	box-shadow: 0 3px 0 var(--ml-edge);
	transition: transform .08s ease, box-shadow .08s ease, background .16s ease, color .16s ease;
	line-height: 1.4;
}
.ml-btn:hover { transform: translateY(-1px); color: var(--ml-text); }
.ml-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ml-edge); }
.ml-btn-green { background: var(--ml-accent); color: var(--ml-on-accent); box-shadow: 0 3px 0 var(--ml-accent-shade); }
.ml-btn-green:hover { background: var(--ml-accent-hover); color: var(--ml-on-accent); box-shadow: 0 3px 0 color-mix(in srgb, var(--ml-accent-shade) 70%, var(--ml-shade)), 0 10px 22px -10px color-mix(in srgb, var(--ml-accent) 65%, transparent); }
.ml-btn-primary { background: var(--ml-info); color: var(--ml-on-info); box-shadow: 0 3px 0 var(--ml-info-shade); }
.ml-btn-primary:hover { color: var(--ml-on-info); background: var(--ml-info-2); box-shadow: 0 3px 0 var(--ml-info-shade), 0 10px 22px -10px color-mix(in srgb, var(--ml-info) 90%, transparent); }
.ml-btn-soft { background: var(--ml-accent-soft); color: var(--ml-accent-ink); box-shadow: 0 3px 0 color-mix(in srgb, var(--ml-accent-soft) 78%, var(--ml-shade)); }
.ml-btn-ghost { background: transparent; box-shadow: none; color: var(--ml-text-muted); padding: 8px 12px; }
.ml-btn-ghost:hover { background: var(--ml-surface-hover); }
.ml-btn-lg { min-width: 190px; padding: 14px 28px; font-size: 17px; border-radius: 17px; }
.ml-btn-disabled { background: var(--ml-disabled-bg); color: var(--ml-disabled-fg); box-shadow: 0 3px 0 var(--ml-edge); cursor: not-allowed; }

/* ---------- Catalog hero ---------- */
.ml-hero {
	position: relative; overflow: hidden;
	display: flex; align-items: center; justify-content: space-between; gap: 30px;
	background: linear-gradient(125deg, var(--ml-surface) 0%, var(--ml-success-bg) 55%, var(--ml-info-soft) 100%);
	border: 1px solid var(--ml-border); border-radius: 28px;
	padding: 38px 40px; margin-bottom: 26px;
	box-shadow: var(--ml-shadow);
}
.ml-hero::after {
	content: ""; position: absolute; inset-inline-start: -90px; top: -110px;
	width: 300px; height: 300px; border-radius: 50%;
	background: radial-gradient(circle, color-mix(in srgb, var(--ml-accent) 16%, transparent), transparent 68%);
	pointer-events: none;
}
.ml-hero-copy { max-width: 620px; position: relative; z-index: 1; }
.ml-hero h1 {
	font-size: clamp(26px, 3.1vw, 40px); line-height: 1.28; margin-bottom: 12px;
	letter-spacing: -.01em; font-weight: 900;
}
.ml-hero p { color: var(--ml-text-muted); line-height: 2; font-size: 15.5px; }

.ml-stats { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.ml-stat {
	background: var(--ml-glass); backdrop-filter: blur(6px);
	border: 1px solid var(--ml-border); border-radius: 18px;
	min-width: 96px; padding: 14px 16px; text-align: center;
	display: flex; flex-direction: column; gap: 2px;
	box-shadow: var(--ml-shadow-sm);
}
.ml-stat-ic { font-size: 19px; line-height: 1.2; }
.ml-stat strong { font-size: 23px; font-weight: 900; letter-spacing: -.02em; }
.ml-stat small { color: var(--ml-text-muted); font-size: 11.5px; font-weight: 600; }

.ml-alert {
	background: var(--ml-danger-bg); border: 1px solid var(--ml-danger-border); color: var(--ml-danger-fg);
	border-radius: 15px; padding: 13px 18px; margin-bottom: 18px; font-weight: 700;
}

/* ---------- Auth ---------- */
.ml-auth { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 32px; }
.ml-auth-card {
	background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: var(--ml-radius); padding: 26px;
	box-shadow: var(--ml-shadow-sm);
}
.ml-auth-card h2 { font-size: 20px; font-weight: 900; margin-bottom: 4px; }
.ml-auth-card form { display: flex; flex-direction: column; gap: 13px; margin-top: 16px; }
.ml-auth-card label { display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; font-weight: 700; color: var(--ml-text-2); }
.ml-auth-card input {
	border: 2px solid var(--ml-border); border-radius: 13px; padding: 11px 13px;
	font: inherit; background: var(--ml-surface-sunken); width: 100%; transition: border-color .15s, background .15s;
}
.ml-auth-card input:focus { outline: none; border-color: var(--ml-info); background: var(--ml-surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ml-info) 12%, transparent); }
.ml-hp { position: absolute; right: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Section heads ---------- */
.ml-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 38px 0 16px; }
.ml-section-head h2 { font-size: 25px; font-weight: 900; letter-spacing: -.01em; }
.ml-section-head p { color: var(--ml-text-muted); font-size: 14px; }

/* ---------- Labs showcase ---------- */
.ml-labs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ml-lab-card {
	position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px;
	border-radius: 26px; padding: 26px 26px 22px; color: var(--ml-on-band);
	box-shadow: var(--ml-shadow-lg);
	transition: transform .18s ease, box-shadow .18s ease;
}
.ml-lab-card:hover { transform: translateY(-3px); }
.ml-lab-card a.ml-lab-card-hit { position: absolute; inset: 0; z-index: 3; }
.ml-lab-card.sql { background: linear-gradient(140deg, var(--ml-info-shade) 0%, var(--ml-info) 62%, var(--ml-info-2) 100%); }
.ml-lab-card.python { background: linear-gradient(140deg, var(--ml-band-shade) 0%, var(--ml-info-shade) 45%, var(--ml-warning) 130%); }
.ml-lab-card::before {
	content: ""; position: absolute; inset-inline-end: -60px; top: -70px;
	width: 220px; height: 220px; border-radius: 50%;
	background: color-mix(in srgb, var(--ml-on-band) 12%, transparent);
}
.ml-lab-card-top { display: flex; align-items: center; gap: 14px; position: relative; z-index: 2; }
.ml-lab-card-icon {
	width: 58px; height: 58px; flex: 0 0 58px; border-radius: 18px;
	display: grid; place-items: center; font-size: 30px;
	background: color-mix(in srgb, var(--ml-on-band) 18%, transparent); border: 1px solid color-mix(in srgb, var(--ml-on-band) 28%, transparent);
	backdrop-filter: blur(4px);
}
.ml-lab-card h3 { font-size: 21px; font-weight: 900; color: var(--ml-on-band); }
.ml-lab-card-tag {
	display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .03em;
	background: color-mix(in srgb, var(--ml-on-band) 22%, transparent); border-radius: 999px; padding: 3px 10px; margin-top: 5px;
}
.ml-lab-card p { color: color-mix(in srgb, var(--ml-on-band) 93%, transparent); line-height: 1.95; font-size: 14.5px; position: relative; z-index: 2; }
.ml-lab-card-meta { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 2; }
.ml-lab-chip {
	font-size: 12px; font-weight: 700; border-radius: 999px; padding: 5px 12px;
	background: color-mix(in srgb, var(--ml-on-band) 16%, transparent); border: 1px solid color-mix(in srgb, var(--ml-on-band) 22%, transparent);
}
.ml-lab-card-cta {
	position: relative; z-index: 2; align-self: flex-start; margin-top: 2px;
	display: inline-flex; align-items: center; gap: 8px;
	background: var(--ml-surface); color: var(--ml-text); font-weight: 900; font-size: 14.5px;
	border-radius: 14px; padding: 11px 20px; box-shadow: 0 4px 0 color-mix(in srgb, var(--ml-shade) 16%, transparent);
}

/* ---------- Course cards ---------- */
.ml-course-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ml-course-card {
	position: relative; display: flex; gap: 16px;
	background: var(--ml-surface); border: 1px solid var(--ml-border);
	border-radius: var(--ml-radius); padding: 20px;
	box-shadow: var(--ml-shadow-sm);
	transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.ml-course-card::before {
	content: ""; position: absolute; inset-inline: 0; top: 0; height: 5px;
	border-radius: var(--ml-radius) var(--ml-radius) 0 0;
	background: linear-gradient(90deg, var(--ml-course), color-mix(in srgb, var(--ml-course) 40%, var(--ml-surface)));
}
.ml-course-card:hover { transform: translateY(-3px); box-shadow: var(--ml-shadow); border-color: color-mix(in srgb, var(--ml-course) 35%, var(--ml-border)); }
.ml-course-card.is-soon { opacity: .8; }
.ml-course-card.is-soon::before { background: var(--ml-border-strong); }
.ml-course-icon {
	width: 58px; height: 58px; flex: 0 0 58px; border-radius: 18px;
	display: flex; align-items: center; justify-content: center; font-size: 29px;
	background: color-mix(in srgb, var(--ml-course) 13%, var(--ml-surface));
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ml-course) 18%, var(--ml-surface));
}
.ml-course-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ml-course-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ml-course-top h3 { font-size: 17.5px; line-height: 1.5; font-weight: 900; }
.ml-badge {
	font-size: 11.5px; font-weight: 800; padding: 4px 11px; border-radius: 999px;
	background: var(--ml-surface-2); color: var(--ml-text-muted); white-space: nowrap;
}
.ml-badge-done { background: var(--ml-accent-soft); color: var(--ml-accent-ink); }
.ml-badge-lab { background: var(--ml-info-soft); color: var(--ml-info-ink); }
.ml-course-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--ml-text-muted); font-size: 12.5px; font-weight: 600; }
.ml-progress { height: 9px; background: var(--ml-surface-2); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.ml-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--ml-accent), color-mix(in srgb, var(--ml-accent) 52%, var(--ml-surface))); border-radius: inherit; transition: width .5s ease; }
.ml-course-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.ml-course-foot .ml-btn { padding: 8px 18px; font-size: 13.5px; border-radius: 13px; }

.ml-note { margin-top: 34px; background: var(--ml-surface); border: 1px dashed var(--ml-border-strong); border-radius: 20px; padding: 20px 22px; }
.ml-note h2 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.ml-note p { color: var(--ml-text-muted); font-size: 14px; }
.ml-note a { color: var(--ml-accent-ink); font-weight: 800; }

/* ---------- Course page ---------- */
.ml-breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--ml-text-muted); font-size: 13.5px; margin-bottom: 16px; font-weight: 600; }
.ml-breadcrumb a { color: var(--ml-accent-ink); font-weight: 800; }
.ml-course-hero {
	position: relative; overflow: hidden;
	display: flex; align-items: center; gap: 24px;
	background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: 26px;
	padding: 26px 28px; margin-bottom: 20px; box-shadow: var(--ml-shadow);
}
.ml-course-hero::before {
	content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 6px;
	background: linear-gradient(180deg, var(--ml-course), color-mix(in srgb, var(--ml-course) 35%, var(--ml-surface)));
}
.ml-course-hero-icon {
	width: 82px; height: 82px; flex: 0 0 82px; border-radius: 22px; font-size: 40px;
	display: flex; align-items: center; justify-content: center;
	background: color-mix(in srgb, var(--ml-course) 14%, var(--ml-surface));
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ml-course) 20%, var(--ml-surface));
}
.ml-course-hero-copy { flex: 1; min-width: 0; }
.ml-course-hero h1 { font-size: clamp(22px, 2.6vw, 31px); margin-bottom: 7px; font-weight: 900; letter-spacing: -.01em; }
.ml-course-hero p { color: var(--ml-text-muted); line-height: 1.95; font-size: 14.5px; }
.ml-course-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: 12.5px; color: var(--ml-text-2); font-weight: 700; }
.ml-course-hero-meta span {
	background: var(--ml-surface-2); border: 1px solid var(--ml-border); border-radius: 999px; padding: 4px 12px;
}
.ml-course-ring {
	width: 96px; height: 96px; border-radius: 50%; flex: 0 0 96px;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	background: conic-gradient(var(--ml-accent) calc(var(--p) * 1%), var(--ml-surface-3) 0);
	position: relative;
}
.ml-course-ring::before { content: ""; position: absolute; inset: 9px; background: var(--ml-surface); border-radius: 50%; }
.ml-course-ring strong, .ml-course-ring small { position: relative; z-index: 1; }
.ml-course-ring strong { font-size: 21px; font-weight: 900; }
.ml-course-ring small { color: var(--ml-text-muted); font-size: 11px; font-weight: 700; }

.ml-lab-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ml-lab-links .ml-btn { padding: 10px 18px; font-size: 13.5px; }

.ml-login-banner {
	display: flex; align-items: center; justify-content: space-between; gap: 14px;
	background: linear-gradient(90deg, var(--ml-warning-bg), var(--ml-warning-bg)); border: 1px solid var(--ml-warning-border); border-radius: 18px;
	padding: 15px 20px; margin-bottom: 18px;
}
.ml-login-banner p { color: var(--ml-warning-fg); font-weight: 700; font-size: 14px; }

/* ---------- Skill path ---------- */
.ml-path { display: flex; flex-direction: column; gap: 20px; margin: 24px 0; }
.ml-unit {
	background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: 26px; padding: 22px 22px 24px;
	box-shadow: var(--ml-shadow-sm);
}
.ml-unit-head {
	display: flex; align-items: center; justify-content: space-between;
	margin: -22px -22px 18px; padding: 16px 22px;
	background: linear-gradient(90deg, color-mix(in srgb, var(--ml-course) 10%, var(--ml-surface)), var(--ml-surface));
	border-bottom: 1px solid var(--ml-border);
	border-radius: 26px 26px 0 0;
}
.ml-unit-head span { font-weight: 900; font-size: 16px; }
.ml-unit-head small { color: var(--ml-text-muted); font-weight: 700; font-size: 12px; }
.ml-nodes { position: relative; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.ml-nodes::before {
	content: ""; position: absolute; top: 10px; bottom: 10px;
	right: calc(50% - 261px); width: 3px;
	background: repeating-linear-gradient(180deg, var(--ml-border-strong) 0 8px, transparent 8px 16px);
	border-radius: 3px;
}
.ml-node-row { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; max-width: 580px; }
.ml-node-wrap {
	display: flex; align-items: center; gap: 14px; flex: 1;
	background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: 20px; padding: 10px 14px 10px 10px;
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.ml-node-row:hover .ml-node-wrap { border-color: color-mix(in srgb, var(--ml-course) 40%, var(--ml-border)); box-shadow: var(--ml-shadow-sm); }
.ml-node {
	width: 58px; height: 58px; flex: 0 0 58px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-weight: 900; font-size: 20px; text-decoration: none;
	background: var(--ml-surface-2); color: var(--ml-text-faint); box-shadow: 0 5px 0 var(--ml-edge);
	transition: transform .12s ease, box-shadow .12s ease;
	position: relative; z-index: 1;
}
a.ml-node:hover { transform: translateY(-2px); }
a.ml-node:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ml-edge); }
.ml-node.is-next { background: var(--ml-accent); color: var(--ml-on-accent); box-shadow: 0 5px 0 var(--ml-accent-shade); animation: ml-pulse 1.9s infinite; }
.ml-node.is-done { background: var(--ml-accent-soft); color: var(--ml-success-ink); box-shadow: 0 5px 0 var(--ml-success-border); }
.ml-node.is-locked { background: var(--ml-surface-2); color: var(--ml-text-faint); box-shadow: 0 5px 0 var(--ml-edge); font-size: 18px; }
@keyframes ml-pulse {
	0%, 100% { box-shadow: 0 5px 0 var(--ml-accent-shade), 0 0 0 0 color-mix(in srgb, var(--ml-accent) 32%, transparent); }
	50% { box-shadow: 0 5px 0 var(--ml-accent-shade), 0 0 0 11px transparent; }
}
.ml-node-label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ml-node-label strong { font-size: 14.5px; font-weight: 800; line-height: 1.55; }
.ml-node-label small { color: var(--ml-text-muted); font-size: 11.5px; font-weight: 600; }
.ml-start-bubble {
	background: var(--ml-accent); color: var(--ml-on-accent); border-radius: 12px; padding: 6px 13px;
	font-weight: 900; font-size: 12.5px; white-space: nowrap;
	box-shadow: 0 3px 0 var(--ml-accent-shade);
}
.ml-complete-banner {
	display: flex; align-items: center; gap: 16px; background: linear-gradient(90deg, var(--ml-success-bg), var(--ml-surface));
	border: 1px solid var(--ml-success-border); border-radius: 22px; padding: 20px 22px; margin-top: 22px;
}
.ml-complete-banner span { font-size: 36px; }
.ml-complete-banner strong { display: block; margin-bottom: 3px; font-size: 16.5px; }
.ml-complete-banner p { color: var(--ml-success-fg); font-size: 14px; }

.ml-empty {
	background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: 24px;
	padding: 34px 26px; text-align: center; box-shadow: var(--ml-shadow-sm);
}
.ml-empty p { margin-top: 10px; }

/* ---------- Lesson player ---------- */
.ml-lesson-view { background: var(--ml-surface); padding: 0 0 130px; min-height: 70vh; position: relative; z-index: 2; }
.ml-lesson-view.ml-app { background: var(--ml-surface); }
.ml-player {
	max-width: 800px; margin: 0 auto;
	min-height: 460px; max-height: calc(100dvh - 150px);
	overflow: hidden;
	display: flex; flex-direction: column; padding: 12px 20px 0;
}
.ml-player-top {
	display: flex; align-items: center; gap: 14px; padding: 6px 0 16px;
	position: sticky; top: 0; background: var(--ml-surface); z-index: 5;
}
.ml-player-close {
	font-size: 19px; color: var(--ml-text-faint); text-decoration: none; line-height: 1;
	width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px;
	transition: background .15s, color .15s;
}
.ml-player-close:hover { background: var(--ml-surface-hover); color: var(--ml-text); }
.ml-player-bar { flex: 1; height: 13px; background: var(--ml-surface-2); border-radius: 999px; overflow: hidden; }
.ml-player-bar i {
	display: block; height: 100%; width: 0; border-radius: inherit;
	background: linear-gradient(90deg, var(--ml-accent), color-mix(in srgb, var(--ml-accent) 52%, var(--ml-surface)));
	box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--ml-shade) 8%, transparent);
	transition: width .4s cubic-bezier(.2, .8, .3, 1);
}
.ml-player-hearts { font-weight: 900; color: var(--ml-heart); white-space: nowrap; font-size: 14.5px; }
.ml-player-lab {
	display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
	font-size: 12.5px; font-weight: 800; color: var(--ml-info-ink);
	background: var(--ml-info-soft); border: 1px solid var(--ml-info-line); border-radius: 999px; padding: 7px 13px;
	transition: background .15s, transform .12s;
}
.ml-player-lab:hover { background: color-mix(in srgb, var(--ml-info) 16%, var(--ml-surface)); color: var(--ml-info-ink); transform: translateY(-1px); }

.ml-player-main {
	flex: 1; padding: 6px 4px 24px 0; overflow-y: auto; overscroll-behavior: contain;
	scrollbar-width: thin; scrollbar-color: var(--ml-scrollbar) transparent;
}
.ml-player-main::-webkit-scrollbar { width: 8px; }
.ml-player-main::-webkit-scrollbar-thumb { background: var(--ml-scrollbar); border-radius: 8px; }
.ml-player-main::-webkit-scrollbar-track { background: transparent; }
.ml-player-inner { width: 100%; }
.ml-skeleton-note {
	margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--ml-accent-line); border-radius: 12px;
	background: var(--ml-accent-soft); color: var(--ml-accent-ink); font-size: 13.5px; line-height: 1.9;
}
.ml-screen { animation: ml-fade .32s ease both; }
@keyframes ml-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.ml-kicker {
	display: inline-flex; align-items: center; gap: 6px;
	color: var(--ml-accent-ink); font-weight: 800; font-size: 12.5px;
	background: var(--ml-accent-soft); border-radius: 999px; padding: 5px 12px; margin-bottom: 14px;
}
.ml-screen h2 {
	font-size: clamp(21px, 2.5vw, 27px); line-height: 1.55; margin-bottom: 8px;
	font-weight: 900; letter-spacing: -.01em;
}
.ml-screen-sub { color: var(--ml-text-muted); font-size: 13px; margin-bottom: 6px; }

/* Article typography inside screens */
.ml-body { color: var(--ml-text-2); line-height: 2.05; font-size: 16px; }
.ml-body > *:first-child { margin-top: 0; }
.ml-body p { margin: 0 0 12px; }
.ml-body p.ml-meta {
	display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px;
	font-size: 12.5px; color: var(--ml-text-muted); font-weight: 600;
}
.ml-body p.ml-meta span {
	background: var(--ml-surface-2); border: 1px solid var(--ml-border); border-radius: 999px; padding: 3px 11px;
}
.ml-body .ml-h {
	position: relative; margin: 26px 0 12px; padding-inline-start: 16px;
	font-size: 18px; font-weight: 900; color: var(--ml-text); line-height: 1.7;
}
.ml-body .ml-h::before {
	content: ""; position: absolute; inset-inline-start: 0; top: .42em; bottom: .42em;
	width: 4px; border-radius: 4px; background: var(--ml-accent);
}
.ml-body .ml-h:first-child { margin-top: 6px; }
.ml-body code {
	background: var(--ml-code-inline-bg); border: 1px solid var(--ml-code-inline-border); border-radius: 7px; padding: 1px 6px;
	font-size: 13.5px; direction: ltr; display: inline-block; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Vazirmatn", "IRANSans", Tahoma, monospace;
	color: var(--ml-code-inline-fg); unicode-bidi: isolate;
}
.ml-body pre {
	background: var(--ml-code-bg); color: var(--ml-code-fg); border-radius: 16px;
	padding: 0; overflow: hidden; direction: ltr; text-align: left;
	font-size: 13px; line-height: 1.75; margin: 0 0 16px;
	border: 1px solid var(--ml-code-border);
	box-shadow: var(--ml-code-shadow);
	unicode-bidi: isolate;
}
.ml-body .ml-code-head {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	padding: 9px 14px; background: var(--ml-code-bar); border-bottom: 1px solid var(--ml-code-border);
	font-size: 11.5px; font-weight: 800; color: var(--ml-code-muted); letter-spacing: .04em;
	direction: ltr;
}
.ml-code-copy {
	border: 1px solid var(--ml-code-border); background: var(--ml-code-btn-bg); color: var(--ml-code-muted);
	border-radius: 8px; padding: 4px 10px; font: inherit; font-size: 11px;
	font-weight: 700; cursor: pointer; transition: background .15s, color .15s;
}
.ml-code-copy:hover { background: var(--ml-code-btn-hover); color: var(--ml-code-fg); }
.ml-code-copy.is-copied { background: var(--ml-success-bg); border-color: var(--ml-success-border); color: var(--ml-success-fg); }
.ml-body pre > code {
	display: block; padding: 14px 16px; overflow-x: auto; background: transparent;
	border: 0; border-radius: 0; font-size: 13px; color: inherit; direction: ltr; text-align: left;
	font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Vazirmatn", "IRANSans", Tahoma, monospace;
	/* Code stays left-to-right; Persian strings inside keep their own reading
	   order and no longer drag the whole line into RTL. */
	unicode-bidi: isolate;
	white-space: pre;
}
.ml-body ul, .ml-body ol { padding-inline-start: 0; margin: 0 0 14px; list-style: none; }
.ml-body ul li {
	position: relative; padding-inline-start: 26px; margin-bottom: 9px; line-height: 1.95;
}
.ml-body ul li::before {
	content: ""; position: absolute; inset-inline-start: 6px; top: .82em;
	width: 8px; height: 8px; border-radius: 3px; background: var(--ml-accent);
	transform: rotate(45deg);
}
.ml-body ol { counter-reset: ml-ol; }
.ml-body ol li { position: relative; padding-inline-start: 30px; margin-bottom: 9px; counter-increment: ml-ol; }
.ml-body ol li::before {
	content: counter(ml-ol); position: absolute; inset-inline-start: 0; top: .2em;
	width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
	background: var(--ml-accent-soft); color: var(--ml-accent-ink);
	font-size: 11.5px; font-weight: 900;
}
.ml-body strong { color: var(--ml-text); font-weight: 800; }
.ml-body a { color: var(--ml-info-ink); text-decoration: underline; }
.ml-body blockquote {
	margin: 0 0 16px; padding: 12px 16px; border-inline-start: 4px solid var(--ml-warning);
	background: var(--ml-warning-bg); border-radius: 0 14px 14px 0; color: var(--ml-warning-fg);
}
.ml-body table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 16px; font-size: 13.5px; }
.ml-body th, .ml-body td { border-bottom: 1px solid var(--ml-border); padding: 9px 12px; text-align: right; }
.ml-body th { background: var(--ml-surface-2); font-weight: 800; color: var(--ml-text); }
.ml-body tr:last-child td { border-bottom: 0; }

/* Screen dots */
.ml-dots { display: flex; justify-content: center; gap: 7px; padding: 4px 0 10px; direction: ltr; }
.ml-dots i {
	width: 8px; height: 8px; border-radius: 50%; background: var(--ml-border-strong); transition: all .25s ease;
}
.ml-dots i.on { background: var(--ml-accent); width: 22px; border-radius: 999px; }
.ml-dots i.past { background: var(--ml-success-light); }

/* Quiz */
.ml-question { font-size: clamp(19px, 2.3vw, 24px); font-weight: 900; line-height: 1.65; margin: 4px 0 20px; }
.ml-question code, .ml-option code, .ml-feedback code {
	unicode-bidi: isolate;
	background: var(--ml-code-inline-bg); border: 1px solid var(--ml-code-inline-border); border-radius: 7px; padding: 1px 6px;
	font-size: .86em; direction: ltr; display: inline-block;
	font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--ml-code-inline-fg);
}
.ml-options { display: flex; flex-direction: column; gap: 11px; }
.ml-option {
	position: relative; width: 100%; text-align: right; background: var(--ml-surface); border: 2px solid var(--ml-border);
	border-radius: 16px; padding: 15px 18px; font: inherit; font-weight: 700; cursor: pointer;
	box-shadow: 0 3px 0 var(--ml-border); color: var(--ml-text);
	transition: border-color .13s ease, background .13s ease, transform .08s ease, box-shadow .13s ease;
	line-height: 1.75;
}
.ml-option:hover { border-color: var(--ml-info); background: var(--ml-surface-hover); }
.ml-option:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ml-border); }
.ml-option.is-selected { border-color: var(--ml-info); background: var(--ml-info-soft); box-shadow: 0 3px 0 var(--ml-info-line); }
.ml-option.is-correct { border-color: var(--ml-success); background: var(--ml-success-bg); box-shadow: 0 3px 0 var(--ml-success-border); }
.ml-option.is-wrong { border-color: var(--ml-danger); background: var(--ml-danger-bg); box-shadow: 0 3px 0 var(--ml-danger-border); }
.ml-option:disabled { cursor: default; transform: none; }

/* Footer */
.ml-player-foot {
	position: relative; z-index: 6; background: var(--ml-surface);
	padding: 12px 0 16px; border-top: 1px solid var(--ml-border);
	box-shadow: 0 -16px 26px -24px color-mix(in srgb, var(--ml-shadow-color) 40%, transparent);
}
.ml-feedback { border-radius: 16px; padding: 14px 18px; margin-bottom: 12px; line-height: 1.9; font-size: 14.5px; }
.ml-feedback.ok { background: var(--ml-success-bg); border: 1px solid var(--ml-success-border); color: var(--ml-success-fg); }
.ml-feedback.bad { background: var(--ml-danger-bg); border: 1px solid var(--ml-danger-border); color: var(--ml-danger-fg); }
.ml-feedback strong { display: block; margin-bottom: 3px; font-size: 14.5px; }
.ml-feedback code {
	background: color-mix(in srgb, currentColor 10%, transparent); color: inherit; border-color: transparent; border-radius: 6px; padding: 1px 5px; direction: ltr; display: inline-block;
	font-size: .9em;
}
.ml-player-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Results */
.ml-result { text-align: center; padding: 34px 0; }
.ml-result .ml-result-ic { font-size: 72px; line-height: 1; margin-bottom: 14px; }
.ml-result h2 { font-size: 30px; margin-bottom: 8px; font-weight: 900; }
.ml-result p { color: var(--ml-text-muted); margin-bottom: 20px; }
.ml-result-stats { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 24px; }
.ml-result-stat {
	background: var(--ml-surface-2); border: 1px solid var(--ml-border); border-radius: 18px;
	padding: 14px 24px; min-width: 118px;
}
.ml-result-stat strong { display: block; font-size: 23px; font-weight: 900; }
.ml-result-stat small { color: var(--ml-text-muted); font-size: 12px; font-weight: 600; }
.ml-result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.ml-heart-lost { animation: ml-shake .4s; }
@keyframes ml-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* Persian words inside code use the Persian UI font; Latin code keeps its
   monospace face, so columns and indentation stay aligned. */
.ml-code-fa {
	font-family: "Vazirmatn", "IRANSans", Tahoma, sans-serif;
	font-size: 1.15em;
	font-weight: 500;
	line-height: inherit;
}

/* Persian string literals and comments are isolated so they read correctly
   inside left-to-right code and never reorder the surrounding list. */
.ml-body pre code .token.string,
.ml-body pre code .token.comment,
.ml-body pre code .token.triple-quoted-string {
	unicode-bidi: isolate;
}

/* Prism token colours: see the shared block next to the editor. */

/* ---------- Full-screen labs ---------- */


/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.ml-labs-grid { grid-template-columns: 1fr; }
	.ml-course-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
	.ml-app { padding: 18px 0 54px; }
	.ml-shell { padding: 0 16px; }
	.ml-hero { flex-direction: column; align-items: flex-start; padding: 26px 22px; gap: 20px; }
	.ml-auth { grid-template-columns: 1fr; }
	.ml-course-hero { flex-wrap: wrap; padding: 20px; }
	.ml-course-hero-icon { width: 62px; height: 62px; flex-basis: 62px; font-size: 30px; border-radius: 18px; }
	.ml-course-ring { margin-inline-start: auto; width: 76px; height: 76px; flex-basis: 76px; }
	.ml-node-row { max-width: 100%; }
	.ml-start-bubble { display: none; }
	.ml-nodes::before { display: none; }
	.ml-body { font-size: 15.5px; }
	.ml-player { padding: 10px 14px 0; }
	.ml-player-foot { padding: 12px 0 14px; }
	.ml-btn-lg { min-width: 0; width: 100%; }
	.ml-player-actions { gap: 8px; }
	.ml-player-actions .ml-btn-lg { width: auto; flex: 1 1 auto; }
	.ml-player-actions .ml-btn-ghost { flex: 0 0 auto; white-space: nowrap; padding: 8px 10px; font-size: 13.5px; }
	.ml-lab-title small { display: none; }
	.ml-lab-top { padding: 8px 12px; }
	.ml-lab-back, .ml-lab-full { font-size: 12px; }
}

/* ============================================================
   Journey dashboard, roadmap and winding path (v3)
   ============================================================ */

.ml-dash-grid,
.ml-course-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 322px;
	gap: 26px;
	align-items: start;
}
.ml-dash-main { min-width: 0; }
.ml-dash-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 20px; }

/* --- Journey hero --- */
.ml-journey {
	position: relative; overflow: hidden; color: var(--ml-on-band);
	border-radius: 24px; padding: 26px 30px 24px;
	background:
		linear-gradient(135deg, color-mix(in srgb, var(--ml-course) 55%, var(--ml-band-shade)) 0%, color-mix(in srgb, var(--ml-course) 92%, var(--ml-band-shade)) 100%);
	box-shadow: 0 24px 48px -26px color-mix(in srgb, var(--ml-band-shade) 65%, transparent);
	margin-bottom: 26px;
}
.ml-journey-glow {
	position: absolute; inset-inline-start: -60px; top: -80px; width: 260px; height: 260px;
	border-radius: 50%; background: color-mix(in srgb, var(--ml-on-band) 12%, transparent); pointer-events: none;
}
.ml-journey-eyebrow {
	display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .06em;
	text-transform: uppercase; color: color-mix(in srgb, var(--ml-on-band) 82%, transparent); margin-bottom: 8px;
}
.ml-journey h1 { color: var(--ml-on-band); font-size: clamp(22px, 2.5vw, 30px); font-weight: 900; display: flex; align-items: center; gap: 10px; }
.ml-journey-icon { font-size: 28px; }
.ml-journey-next { color: color-mix(in srgb, var(--ml-on-band) 90%, transparent); font-size: 14px; margin-top: 8px; }
.ml-journey-bar { height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--ml-on-band) 16%, transparent); margin: 16px 0 8px; overflow: hidden; }
.ml-journey-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ml-surface); }
.ml-journey-meta { display: flex; gap: 8px; align-items: center; font-size: 12.5px; font-weight: 700; color: color-mix(in srgb, var(--ml-on-band) 85%, transparent); }
.ml-journey-dot { opacity: .6; }
.ml-journey-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.ml-journey-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	border-radius: 14px; padding: 11px 22px; font-weight: 900; font-size: 14px;
	text-decoration: none; transition: transform .12s ease, background .15s ease;
}
.ml-journey-btn.is-primary { background: var(--ml-surface); color: var(--ml-text); box-shadow: 0 4px 0 color-mix(in srgb, var(--ml-shade) 18%, transparent); }
.ml-journey-btn.is-primary:hover { transform: translateY(-1px); color: var(--ml-text); }
.ml-journey-btn.is-ghost { background: color-mix(in srgb, var(--ml-on-band) 16%, transparent); color: var(--ml-on-band); border: 1px solid color-mix(in srgb, var(--ml-on-band) 30%, transparent); }
.ml-journey-btn.is-ghost:hover { background: color-mix(in srgb, var(--ml-on-band) 26%, transparent); color: var(--ml-on-band); }

/* --- Roadmap stage cards --- */
.ml-roadmap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ml-stage {
	position: relative; display: flex; flex-direction: column; gap: 8px;
	background: var(--ml-surface); border: 1.5px solid var(--ml-border); border-radius: 20px;
	padding: 16px 16px 14px; box-shadow: var(--ml-shadow-sm);
	transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.ml-stage:hover { transform: translateY(-2px); box-shadow: var(--ml-shadow); }
.ml-stage.is-current { border-color: var(--ml-info); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ml-info) 12%, transparent); }
.ml-stage.is-done { border-color: var(--ml-success-border); }
.ml-stage-num { position: absolute; inset-inline-end: 14px; top: 12px; font-size: 10.5px; font-weight: 800; color: var(--ml-text-faint); letter-spacing: .04em; }
.ml-stage-icon {
	width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
	font-size: 26px; background: color-mix(in srgb, var(--ml-course) 14%, var(--ml-surface));
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ml-course) 22%, var(--ml-surface));
}
.ml-stage h3 { font-size: 15.5px; font-weight: 900; line-height: 1.55; margin-top: 2px; }
.ml-stage h3 a { color: var(--ml-text); }
.ml-stage h3 a:hover { color: var(--ml-info-ink); }
.ml-stage-sub { color: var(--ml-text-muted); font-size: 12.5px; line-height: 1.85; min-height: 34px; }
.ml-stage-lab {
	align-self: flex-start; font-size: 10.5px; font-weight: 800; color: var(--ml-info-ink);
	background: var(--ml-info-soft); border-radius: 999px; padding: 3px 9px;
}
.ml-stage-bar { height: 8px; border-radius: 999px; background: var(--ml-surface-2); overflow: hidden; margin-top: 2px; }
.ml-stage-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ml-accent); transition: width .5s ease; }
.ml-stage-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 11.5px; color: var(--ml-text-muted); font-weight: 700; }
.ml-stage-pill {
	font-size: 10.5px; font-weight: 900; letter-spacing: .02em; border-radius: 9px;
	padding: 5px 10px; background: var(--ml-surface-2); color: var(--ml-text-muted); white-space: nowrap;
}
.ml-stage-pill.is-current { background: var(--ml-info); color: var(--ml-on-info); }

/* --- Sidebar --- */
.ml-side-card {
	background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: 18px;
	padding: 16px 16px 14px; box-shadow: var(--ml-shadow-sm);
}
.ml-side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ml-side-head h3 { font-size: 14px; font-weight: 900; }
.ml-side-badge { font-size: 10.5px; font-weight: 800; color: var(--ml-info-ink); background: var(--ml-info-soft); border-radius: 999px; padding: 3px 9px; }
.ml-goal-line { display: flex; align-items: baseline; gap: 6px; font-size: 19px; }
.ml-goal-line strong { font-size: 22px; font-weight: 900; }
.ml-goal-line .ml-muted { font-size: 12.5px; }
.ml-goal-ic { font-size: 17px; }
.ml-side-bar { height: 8px; border-radius: 999px; background: var(--ml-surface-2); overflow: hidden; margin: 9px 0; }
.ml-side-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ml-warning-2), var(--ml-accent-2)); }
.ml-side-bar.is-level i { background: linear-gradient(90deg, var(--ml-warning), var(--ml-warning-2)); }
.ml-streak-line { font-size: 12px; font-weight: 700; color: var(--ml-text-muted); }
.ml-streak-dots { display: flex; gap: 5px; margin-top: 8px; direction: ltr; }
.ml-streak-dots span { flex: 1; height: 9px; border-radius: 3px; background: var(--ml-surface-2); }
.ml-streak-dots span.on { background: var(--ml-accent-3); }
.ml-side-action {
	display: flex; flex-direction: column; gap: 3px; border-radius: 16px; padding: 13px 16px;
	color: var(--ml-on-band); text-decoration: none; box-shadow: var(--ml-shadow-sm);
	transition: transform .12s ease, filter .15s ease;
}
.ml-side-action:hover { transform: translateY(-1px); color: var(--ml-on-band); filter: brightness(1.05); }
.ml-side-action.is-continue { background: linear-gradient(135deg, var(--ml-violet), var(--ml-violet-2)); }
.ml-side-action.is-review { background: linear-gradient(135deg, var(--ml-success), var(--ml-success-shade)); }
.ml-side-action-title { font-size: 13.5px; font-weight: 900; }
.ml-side-action-sub { font-size: 11.5px; opacity: .88; }
.ml-mission { margin-bottom: 11px; }
.ml-mission-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 700; }
.ml-mission-label { display: inline-flex; align-items: center; gap: 6px; }
.ml-mission-count { color: var(--ml-text-muted); font-size: 11.5px; }
.ml-mission-bar { height: 6px; border-radius: 999px; background: var(--ml-surface-2); overflow: hidden; margin-top: 6px; }
.ml-mission-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ml-accent); }
.ml-mission-note { font-size: 11.5px; color: var(--ml-text-muted); border-top: 1px dashed var(--ml-border); padding-top: 10px; margin-top: 4px; text-align: center; }
.ml-level-line { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 900; }
.ml-level-line strong { font-size: 19px; }
.ml-level-star { font-size: 17px; }
.ml-level-note { font-size: 11.5px; color: var(--ml-text-muted); }
.ml-level-actions { display: flex; gap: 8px; margin-top: 12px; }
.ml-level-chip {
	flex: 1; text-align: center; font-size: 12px; font-weight: 800;
	border: 1px solid var(--ml-border); border-radius: 11px; padding: 7px 8px; color: var(--ml-text-2);
}
.ml-level-chip:hover { border-color: var(--ml-info); color: var(--ml-info-ink); }

@media (max-width: 1080px) {
	.ml-roadmap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
	.ml-dash-grid, .ml-course-layout { grid-template-columns: minmax(0, 1fr); }
	.ml-dash-side { position: static; }
}
@media (max-width: 620px) {
	.ml-roadmap { grid-template-columns: minmax(0, 1fr); }
	.ml-journey { padding: 22px 20px; }
}

/* --- Course stage hero --- */
.ml-back-pill {
	display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px;
	background: var(--ml-surface); border: 1.5px solid var(--ml-border); border-radius: 999px;
	padding: 8px 16px; font-size: 12.5px; font-weight: 800; color: var(--ml-text-2);
	box-shadow: var(--ml-shadow-sm);
}
.ml-back-pill:hover { border-color: var(--ml-info); color: var(--ml-info-ink); }

.ml-stage-hero {
	position: relative; overflow: hidden; color: var(--ml-on-band); border-radius: 22px;
	padding: 22px 26px; margin-bottom: 22px;
	background: linear-gradient(135deg, color-mix(in srgb, var(--ml-course) 45%, var(--ml-band-shade)) 0%, color-mix(in srgb, var(--ml-course) 90%, var(--ml-band-shade)) 100%);
	box-shadow: 0 22px 44px -26px color-mix(in srgb, var(--ml-band-shade) 60%, transparent);
}
.ml-stage-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--ml-accent-ink); }
.ml-stage-hero .ml-stage-eyebrow { color: color-mix(in srgb, var(--ml-on-band) 80%, transparent); }
.ml-stage-hero h1 { color: var(--ml-on-band); font-size: clamp(20px, 2.3vw, 27px); font-weight: 900; display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.ml-stage-hero-icon { font-size: 26px; }
.ml-stage-hero-bar { height: 9px; border-radius: 999px; background: color-mix(in srgb, var(--ml-on-band) 16%, transparent); overflow: hidden; }
.ml-stage-hero-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ml-surface); }
.ml-stage-hero-meta { font-size: 12.5px; color: color-mix(in srgb, var(--ml-on-band) 88%, transparent); margin-top: 8px; font-weight: 700; }
.ml-stage-hero-lab { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.ml-stage-lab-btn {
	background: color-mix(in srgb, var(--ml-on-band) 18%, transparent); border: 1px solid color-mix(in srgb, var(--ml-on-band) 30%, transparent);
	color: var(--ml-on-band); border-radius: 12px; padding: 8px 15px; font-size: 12.5px; font-weight: 800;
}
.ml-stage-lab-btn:hover { background: color-mix(in srgb, var(--ml-on-band) 30%, transparent); color: var(--ml-on-band); }

/* --- Player step bar (step view chrome) --- */
.ml-player-top { gap: 12px; }
.ml-player-track { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.ml-player-bar { position: relative; flex: 1; height: 15px; background: var(--ml-surface-3); border-radius: 999px; }
.ml-player-knob {
	position: absolute; top: 50%; width: 26px; height: 26px; border-radius: 50%;
	transform: translate(50%, -50%); background: var(--ml-surface); border: 4px solid var(--ml-accent);
	box-shadow: 0 2px 8px color-mix(in srgb, var(--ml-shadow-color) 18%, transparent); transition: inset-inline-start .35s ease;
}
.ml-player-count { font-size: 12.5px; font-weight: 900; color: var(--ml-text-muted); white-space: nowrap; direction: ltr; }
.ml-player-xp {
	font-size: 12px; font-weight: 900; color: var(--ml-warning-ink); background: var(--ml-warning-bg);
	border: 1px solid var(--ml-warning-border); border-radius: 999px; padding: 5px 10px; white-space: nowrap;
}
.ml-player-hearts { font-size: 14px; font-weight: 900; color: var(--ml-heart); }


/* ---------- Paid access: free allowance, locked steps, paywall ---------- */
.ml-access-strip {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
	margin-top: 18px; direction: rtl;
}
.ml-access-chip {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 12.5px; font-weight: 800; line-height: 1;
	border-radius: 999px; padding: 8px 14px;
	background: var(--ml-surface); border: 1.5px solid var(--ml-border); color: var(--ml-text-2);
}
.ml-access-chip.is-free { background: var(--ml-success-bg); border-color: var(--ml-success-border); color: var(--ml-success-ink); }
.ml-access-chip.is-locked { background: var(--ml-warning-bg); border-color: var(--ml-warning-border); color: var(--ml-warning-ink); }
.ml-access-chip.is-owned { background: var(--ml-info-soft); border-color: var(--ml-info-line); color: var(--ml-info-ink); }
.ml-access-price { font-size: 15px; font-weight: 900; color: var(--ml-text); }
.ml-access-buy { padding: 10px 20px; font-size: 13.5px; border-radius: 14px; box-shadow: 0 3px 0 var(--ml-accent-shade); }

.ml-paywall {
	max-width: 660px; margin: 34px auto 0; padding: 40px 30px;
	background: var(--ml-surface); border: 1.5px solid var(--ml-border);
	border-radius: 26px; box-shadow: var(--ml-shadow); text-align: center;
}
.ml-paywall-lock {
	width: 86px; height: 86px; margin: 0 auto 14px;
	display: grid; place-items: center; font-size: 38px;
	border-radius: 50%; background: var(--ml-warning-bg); border: 3px solid var(--ml-warning-border);
}
.ml-paywall-eyebrow {
	display: inline-block; font-size: 12px; font-weight: 900; letter-spacing: .04em;
	color: var(--ml-warning-ink); background: var(--ml-warning-bg); border-radius: 999px; padding: 6px 14px;
}
.ml-paywall h1 { font-size: 26px; line-height: 1.5; margin: 14px 0 8px; }
.ml-paywall-course { font-size: 13px; font-weight: 700; color: var(--ml-text-muted); }
.ml-paywall-note { font-size: 14px; font-weight: 700; color: var(--ml-text-2); margin-top: 14px; }
.ml-paywall-price { font-size: 28px; font-weight: 900; color: var(--ml-text); margin-top: 18px; }
.ml-paywall-price del { font-size: 16px; color: var(--ml-text-muted); font-weight: 700; margin-left: 8px; }
.ml-paywall-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

@media (max-width: 600px) {
	.ml-paywall { padding: 30px 18px; border-radius: 20px; }
	.ml-paywall h1 { font-size: 21px; }
	.ml-paywall-price { font-size: 23px; }
}

/* Optional lesson video (rendered as the first screen). */
.ml-video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	margin: 6px 0 22px;
	background: var(--ml-media-bg);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 18px 40px -28px color-mix(in srgb, var(--ml-shadow-color) 55%, transparent);
}
.ml-video__el {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

/* ---------- Player fits the viewport (slim chrome + internal scroll) ---------- */
body.ml-academy-player {
	display: flex;
	flex-direction: column;
	height: 100dvh;
	min-height: 0;
	overflow: hidden;
}

body.ml-academy-player .ml-lesson-view {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-height: 0;
	padding: 8px 0 0;
}

body.ml-academy-player .ml-player {
	flex: 1 1 auto;
	width: 100%;
	min-height: 0;
	max-height: none;
}

@media (max-width: 782px) {
	body.ml-academy-player .ml-lesson-view { padding-top: 4px; }
}

/* The admin bar pushes the page down by 32px; keep the player inside the fold. */
body.admin-bar.ml-academy-player { height: calc(100dvh - 32px); }

@media (max-width: 782px) {
	body.admin-bar.ml-academy-player { height: calc(100dvh - 46px); }
}


body.ml-academy-player .ml-lesson-view { background: var(--ml-bg); }
body.ml-academy-player .ml-player { background: transparent; }

.ml-player-top { background: var(--ml-bg); }
.ml-player-bar { background: var(--ml-surface-3); }
.ml-player-bar i { background: linear-gradient(90deg, var(--ml-accent), var(--ml-accent-3)); }
.ml-player-close:hover { background: var(--ml-surface-hover); color: var(--ml-accent-ink); }

/* ---------- Previous / next lesson inside the current unit ---------- */
.ml-player-nav { display: inline-flex; gap: 4px; }

.ml-nav-btn {
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	border: 1px solid var(--ml-border);
	border-radius: 10px;
	background: var(--ml-surface);
	color: var(--ml-text-2);
	font-size: 18px;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.ml-nav-btn:hover { background: var(--ml-accent-soft); border-color: transparent; color: var(--ml-accent-ink); }
.ml-nav-btn.is-disabled { opacity: .3; cursor: default; }

.ml-player-sound {
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	border: 1px solid var(--ml-border);
	border-radius: 10px;
	background: var(--ml-surface);
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
}

.ml-player-sound:hover { background: var(--ml-accent-soft); }

/* ---------- Confetti (success feedback, no libraries) ---------- */
.ml-confetti {
	position: fixed;
	inset: 0;
	z-index: 9999;
	overflow: hidden;
	pointer-events: none;
}

.ml-confetti i {
	position: absolute;
	top: -14px;
	left: 50%;
	width: 9px;
	height: 14px;
	border-radius: 3px;
	opacity: 0;
	animation: ml-confetti-fall 1.25s ease-out forwards;
}

@keyframes ml-confetti-fall {
	0% { opacity: 0; transform: translate(-50%, -10px) rotate(0deg); }
	12% { opacity: 1; }
	100% { opacity: 0; transform: translate(calc(-50% + var(--x) * 42vw), 82vh) rotate(var(--r)); }
}

@media (prefers-reduced-motion: reduce) {
	.ml-confetti { display: none; }
}

@media (max-width: 640px) {
	.ml-player-top { gap: 8px; }
	.ml-nav-btn, .ml-player-sound { width: 30px; height: 30px; font-size: 15px; }
	.ml-player-xp { display: none; }
}

/* Admin preview: lets an administrator walk any course without the locks. */
.ml-preview-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--ml-accent-soft);
	border: 1px solid var(--ml-accent-line);
	color: var(--ml-accent-ink);
	font-size: 11.5px;
	font-weight: 800;
	white-space: nowrap;
}

.ml-preview-note {
	margin: 12px 0 18px;
	padding: 10px 14px;
	border-radius: 14px;
	background: var(--ml-accent-soft);
	border: 1px solid var(--ml-accent-line);
	color: var(--ml-accent-ink);
	font-size: 13px;
	font-weight: 600;
}

/* ---------- Compact quiz on phones ---------- */
/* All four answers must be visible without scrolling on a phone screen. */
@media (max-width: 560px) {
	.ml-player-main { padding: 0 2px 0 0; }
	.ml-kicker { margin-bottom: 5px; padding: 3px 8px; font-size: 11px; }
	.ml-question { font-size: 17.5px; line-height: 1.5; margin: 0 0 6px; }
	.ml-options { gap: 5px; }
	.ml-option { padding: 8px 12px; line-height: 1.35; font-size: 15px; border-radius: 13px; }
	.ml-player-foot { padding: 6px 0 8px; }
	.ml-player-actions .ml-btn-lg { padding: 11px 20px; }
	/* Long questions drop the kicker instead of hiding the last answer. */
	.ml-quiz-tight .ml-kicker { display: none; }
	.ml-quiz-tight .ml-question { margin-bottom: 4px; }
}

/* ============================================================
   Academy home — three big course tracks
   ============================================================ */

.ml-home { padding: 40px 0 84px; }
.ml-home .ml-shell { max-width: 1180px; }

.ml-home-hero {
	display: flex; align-items: flex-end; justify-content: space-between; gap: 30px;
	margin-bottom: 30px;
}
.ml-home-hero-copy { max-width: 640px; }
.ml-home-hero h1 {
	font-size: clamp(27px, 3.4vw, 40px); line-height: 1.4; font-weight: 900;
	letter-spacing: -.015em; margin-bottom: 10px;
}
.ml-home-hero p { color: var(--ml-text-muted); font-size: 15px; line-height: 2; }
.ml-home-user { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.ml-home-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.ml-home-chip {
	background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: 999px;
	padding: 7px 13px; font-size: 12px; font-weight: 700; color: var(--ml-text-muted);
	box-shadow: var(--ml-shadow-sm); white-space: nowrap;
}
.ml-home-chip b { color: var(--ml-text); font-weight: 900; margin-left: 4px; }
.ml-home-continue {
	display: flex; flex-direction: column; gap: 3px; align-items: flex-end;
	background: var(--ml-text); color: var(--ml-surface); border-radius: 16px; padding: 11px 18px;
	box-shadow: 0 4px 0 color-mix(in srgb, var(--ml-text) 70%, var(--ml-shade)); transition: transform .12s, box-shadow .12s;
	max-width: 360px;
}
.ml-home-continue:hover { transform: translateY(-1px); box-shadow: 0 6px 0 color-mix(in srgb, var(--ml-text) 70%, var(--ml-shade)); color: var(--ml-surface); }
.ml-home-continue span { font-weight: 900; font-size: 13.5px; }
.ml-home-continue small { color: color-mix(in srgb, var(--ml-surface) 72%, transparent); font-size: 11.5px; font-weight: 600; }

.ml-auth-drawer {
	background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: 18px;
	padding: 0 20px; margin-bottom: 26px; box-shadow: var(--ml-shadow-sm);
}
.ml-auth-drawer > summary {
	cursor: pointer; font-weight: 800; font-size: 14px; padding: 15px 2px;
	list-style: none; color: var(--ml-text-2);
}
.ml-auth-drawer > summary::-webkit-details-marker { display: none; }
.ml-auth-drawer > summary::after { content: '+'; float: left; color: var(--ml-text-muted); font-weight: 900; }
.ml-auth-drawer[open] > summary::after { content: '−'; }
.ml-auth-drawer .ml-auth { margin-bottom: 20px; }

.ml-track-grid {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px; align-items: start;
}
.ml-track {
	position: relative;
	background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: 26px;
	overflow: hidden; display: flex; flex-direction: column;
	box-shadow: var(--ml-shadow);
	transition: transform .2s ease, box-shadow .2s ease;
}
.ml-track:hover { transform: translateY(-3px); box-shadow: var(--ml-shadow-lg); }
.ml-track-head {
	position: relative; padding: 24px 22px 20px;
	background:
		radial-gradient(360px 180px at 100% 0%, color-mix(in srgb, var(--track) 16%, transparent), transparent 75%),
		linear-gradient(180deg, color-mix(in srgb, var(--track) 7%, var(--ml-surface)), var(--ml-surface));
	border-bottom: 1px solid var(--ml-border);
}
.ml-track-head::before {
	content: ""; position: absolute; inset: 0 0 auto; height: 5px;
	background: linear-gradient(90deg, var(--track), color-mix(in srgb, var(--track) 45%, var(--ml-surface)));
}
.ml-track-head-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.ml-track-orb {
	width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center;
	font-size: 26px; background: color-mix(in srgb, var(--track) 14%, var(--ml-surface));
	border: 1px solid color-mix(in srgb, var(--track) 25%, var(--ml-surface));
	box-shadow: 0 6px 16px -10px color-mix(in srgb, var(--track) 60%, transparent);
}
.ml-track-kicker {
	font-size: 11px; font-weight: 800; color: color-mix(in srgb, var(--track) 75%, var(--ml-text));
	background: color-mix(in srgb, var(--track) 10%, var(--ml-surface));
	border: 1px solid color-mix(in srgb, var(--track) 20%, var(--ml-surface));
	border-radius: 999px; padding: 5px 10px; white-space: nowrap;
}
.ml-track-head h2 { font-size: 21px; line-height: 1.5; font-weight: 900; margin-bottom: 8px; }
.ml-track-head h2 a { color: var(--ml-text); }
.ml-track-head h2 a:hover { color: color-mix(in srgb, var(--track) 80%, var(--ml-shade)); }
/* The whole card opens the course; steps and CTAs stay independently clickable. */
.ml-track-head h2 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.ml-track-cta, .ml-ts > a, .ml-track-foot a { position: relative; z-index: 2; }
.ml-track-desc { color: var(--ml-text-muted); font-size: 13px; line-height: 1.95; margin-bottom: 16px; min-height: 50px; }
.ml-track-stats {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	font-size: 11.5px; font-weight: 800; color: var(--ml-text-2); margin-bottom: 8px;
}
.ml-track-bar { height: 9px; border-radius: 999px; background: var(--ml-surface-2); overflow: hidden; }
.ml-track-bar i {
	display: block; height: 100%; border-radius: inherit;
	background: linear-gradient(90deg, var(--track), color-mix(in srgb, var(--track) 55%, var(--ml-surface)));
	transition: width .5s ease;
}
.ml-track-progress {
	display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px;
	font-size: 11.5px; font-weight: 700; color: var(--ml-text-muted);
}
.ml-track-cta {
	display: inline-flex; align-items: center; gap: 6px;
	background: var(--track); color: var(--ml-on-track); border-radius: 12px; padding: 9px 14px;
	font-size: 12.5px; font-weight: 900; box-shadow: 0 3px 0 color-mix(in srgb, var(--track) 75%, var(--ml-shade));
	transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.ml-track-cta:hover { color: var(--ml-on-track); transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 5px 0 color-mix(in srgb, var(--track) 75%, var(--ml-shade)); }

.ml-track-path { position: relative; list-style: none; margin: 0; padding: 16px 18px 8px; flex: 1; }
.ml-track-path::before {
	content: ""; position: absolute; top: 22px; bottom: 22px; right: 37px; width: 2px;
	background: linear-gradient(180deg, var(--ml-border), color-mix(in srgb, var(--track) 30%, var(--ml-surface)));
}
.ml-ts { position: relative; margin-bottom: 6px; }
.ml-ts > a {
	display: grid; grid-template-columns: 34px 1fr 20px; align-items: center; gap: 10px;
	padding: 9px 10px; border-radius: 14px; border: 1px solid transparent;
	transition: background .15s, border-color .15s, transform .12s;
}
.ml-ts > a:hover { background: color-mix(in srgb, var(--track) 6%, var(--ml-surface)); border-color: color-mix(in srgb, var(--track) 18%, var(--ml-surface)); transform: translateX(-2px); }
.ml-ts-num {
	width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
	background: var(--ml-surface); border: 2px solid var(--ml-border);
	color: var(--ml-text-muted); font-weight: 900; font-size: 12px; z-index: 1;
}
.ml-ts-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ml-ts-body strong { font-size: 13.5px; font-weight: 800; color: var(--ml-text); line-height: 1.6; }
.ml-ts-body small { font-size: 11px; color: var(--ml-text-muted); font-weight: 600; }
.ml-ts-paid { color: var(--ml-warning-ink); background: var(--ml-warning-bg); border-radius: 999px; padding: 1px 6px; }
.ml-ts-here { color: var(--track); font-weight: 800; }
.ml-ts-bar { height: 4px; border-radius: 999px; background: var(--ml-surface-2); overflow: hidden; margin-top: 2px; }
.ml-ts-bar i { display: block; height: 100%; background: var(--track); border-radius: inherit; }
.ml-ts-state { font-size: 15px; color: var(--ml-text-muted); text-align: center; }
.ml-ts.is-done .ml-ts-num { background: var(--ml-success-bg); border-color: var(--ml-success-border); color: var(--ml-success-ink); }
.ml-ts.is-done .ml-ts-state { color: var(--ml-success-ink); }
.ml-ts.is-current > a {
	background: color-mix(in srgb, var(--track) 8%, var(--ml-surface));
	border-color: color-mix(in srgb, var(--track) 35%, var(--ml-surface));
	box-shadow: 0 4px 14px -12px color-mix(in srgb, var(--track) 65%, transparent);
}
.ml-ts.is-current .ml-ts-num {
	background: var(--track); border-color: var(--track); color: var(--ml-on-track);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--track) 16%, transparent);
}
.ml-ts.is-current .ml-ts-state { color: var(--track); font-weight: 900; }

.ml-track-foot { padding: 12px 20px 16px; border-top: 1px dashed var(--ml-border); }
.ml-track-foot a { font-size: 12.5px; font-weight: 800; color: var(--ml-text-2); display: inline-flex; gap: 6px; }
.ml-track-foot a:hover { color: var(--track); }



/* The AI track is the flagship: full width with a two-column ladder. */
@media (min-width: 1021px) {
	.ml-track-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ml-track--wide { grid-column: 1 / -1; }
	.ml-track--wide .ml-track-head h2 { font-size: 26px; }
	.ml-track--wide .ml-track-desc { max-width: 720px; min-height: 0; }
	.ml-track--wide .ml-track-path {
		display: grid; grid-template-columns: 1fr 1fr;
		grid-template-rows: repeat(5, auto); grid-auto-flow: column;
		gap: 2px 20px; padding: 18px 22px 10px;
	}
	.ml-track--wide .ml-track-path::before { display: none; }
	.ml-track--wide .ml-ts { margin-bottom: 2px; }
}

@media (max-width: 1020px) {
	.ml-track-grid { grid-template-columns: 1fr; max-width: 620px; margin: 0 auto; }
	.ml-track-desc { min-height: 0; }
	.ml-home-hero { flex-direction: column; align-items: flex-start; gap: 18px; }
	.ml-home-user { align-items: flex-start; }
	.ml-home-chips { justify-content: flex-start; }
	.ml-home-continue { align-items: flex-start; }
}
@media (max-width: 720px) {
	.ml-home { padding: 26px 0 60px; }
	.ml-track-head { padding: 20px 18px 16px; }
	.ml-track-path { padding: 12px 12px 6px; }
	.ml-track-path::before { right: 31px; }
	.ml-home-hero h1 { font-size: 25px; }
}
/* ---------- Academy home: course cover cards ---------- */

.ml-course-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 22px;
	align-items: stretch;
}
.ml-course-card {
	display: flex; flex-direction: column; overflow: hidden;
	padding: 0; gap: 0;
	background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: 24px;
	box-shadow: var(--ml-shadow); color: var(--ml-text);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ml-course-card::before { content: none; }
.ml-course-card:hover {
	transform: translateY(-4px); color: var(--ml-text);
	border-color: color-mix(in srgb, var(--track) 30%, var(--ml-border));
	box-shadow: var(--ml-shadow-lg);
}
.ml-course-cover { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ml-cover-bg); }
.ml-course-cover::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, transparent 45%, color-mix(in srgb, var(--ml-cover-scrim) 34%, transparent));
}
.ml-course-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.ml-course-card:hover .ml-course-cover img { transform: scale(1.045); }
.ml-course-kicker {
	position: absolute; top: 12px; inset-inline-start: 12px; z-index: 1;
	background: var(--ml-glass); backdrop-filter: blur(6px);
	border-radius: 999px; padding: 5px 11px;
	font-size: 10.5px; font-weight: 800; color: var(--ml-text-2);
	box-shadow: 0 4px 12px -8px color-mix(in srgb, var(--ml-shadow-color) 50%, transparent);
}
.ml-course-body { display: flex; flex-direction: column; gap: 9px; padding: 18px 18px 20px; flex: 1; }
.ml-course-head { display: flex; align-items: center; gap: 9px; }
.ml-course-orb {
	width: 36px; height: 36px; flex: 0 0 36px; border-radius: 12px;
	display: grid; place-items: center; font-size: 19px;
	background: color-mix(in srgb, var(--track) 12%, var(--ml-surface));
	border: 1px solid color-mix(in srgb, var(--track) 20%, var(--ml-surface));
}
.ml-course-head h2 { font-size: 18.5px; font-weight: 900; line-height: 1.5; color: var(--ml-text); }
.ml-course-desc {
	color: var(--ml-text-muted); font-size: 12.5px; line-height: 1.95;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ml-course-meta { font-size: 11.5px; font-weight: 800; color: var(--ml-text-2); }
.ml-course-bar { height: 8px; border-radius: 999px; background: var(--ml-surface-2); overflow: hidden; margin-top: 2px; }
.ml-course-bar i {
	display: block; height: 100%; border-radius: inherit;
	background: linear-gradient(90deg, var(--track), color-mix(in srgb, var(--track) 55%, var(--ml-surface)));
}
.ml-course-bar.is-lab i { background: color-mix(in srgb, var(--track) 30%, var(--ml-surface)); }
.ml-course-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.ml-course-count { font-size: 11px; font-weight: 700; color: var(--ml-text-muted); }
.ml-course-cta {
	display: inline-flex; align-items: center; gap: 6px;
	background: var(--track); color: var(--ml-on-track); border-radius: 11px;
	padding: 8px 13px; font-size: 12px; font-weight: 900;
	box-shadow: 0 3px 0 color-mix(in srgb, var(--track) 72%, var(--ml-shade));
	transition: transform .12s ease, filter .12s ease;
}
.ml-course-card:hover .ml-course-cta { transform: translateY(-1px); filter: brightness(1.05); }

@media (max-width: 1020px) {
	.ml-course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
	.ml-course-grid { grid-template-columns: 1fr; }
	.ml-course-cover { aspect-ratio: 16 / 9; }
}
/* ---------- Program overview (AI engineering) ---------- */

.ml-program-main { min-width: 0; }
.ml-stage-hero-desc { color: var(--ml-text-muted); font-size: 14px; line-height: 1.95; max-width: 700px; margin: 8px 0 14px; }
.ml-stage-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.ml-program-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ml-program-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ml-program-body strong { font-size: 14px; font-weight: 800; color: var(--ml-text); line-height: 1.6; }
.ml-program-body small {
	font-size: 11px; color: var(--ml-text-muted); font-weight: 600;
	display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ml-program-bar { height: 5px; border-radius: 999px; background: var(--ml-surface-2); overflow: hidden; margin-top: 2px; }
.ml-program-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ml-accent); }
.ml-program-state { color: var(--ml-text-muted); font-size: 17px; text-align: center; }

@media (max-width: 820px) {
	.ml-stage-hero-desc { font-size: 13px; }
}

@media (max-width: 760px) {
}
/* Program hero readability on the colored band */
.ml-stage-hero-desc { color: color-mix(in srgb, var(--ml-on-band) 88%, transparent); max-width: 720px; }
.ml-stage-hero-actions .ml-btn-green {
	background: var(--ml-highlight); color: var(--ml-accent-shade);
	box-shadow: 0 4px 0 color-mix(in srgb, var(--ml-shade) 18%, transparent);
}
.ml-stage-hero-actions .ml-btn-green:hover { background: var(--ml-highlight); color: var(--ml-accent-shade); filter: brightness(.98); }
@media (max-width: 620px) {
	.ml-program-main .ml-section-head { display: block; margin-top: 26px; }
	.ml-program-main .ml-section-head h2 { font-size: 21px; line-height: 1.5; }
	.ml-program-main .ml-section-head p { margin-top: 5px; font-size: 12.5px; line-height: 1.8; }
}
/* ---------- Data course: unit cards ---------- */

.ml-unit-main { min-width: 0; }

/* ---------- Course journey: hex path ---------- */

.ml-jr { --jr-gap: 18px; display: flex; flex-direction: column; gap: var(--jr-gap); }

.ml-jr-bar {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	width: 100%; max-width: 460px; margin: 0 auto;
}
.ml-jr-heading { font-size: 13.5px; font-weight: 900; color: var(--ml-text-2); }
.ml-jr-score { font-size: 12px; font-weight: 900; color: var(--ml-info-ink); background: var(--ml-info-soft); border-radius: 999px; padding: 5px 12px; white-space: nowrap; }

.ml-jr-seg { display: flex; gap: 4px; width: 100%; max-width: 460px; margin: 0 auto; }
.ml-jr-seg i { flex: 1; height: 7px; border-radius: 999px; background: var(--ml-border); transition: background .3s ease; }
.ml-jr-seg i.is-on { background: var(--ml-accent); }

.ml-jr-path {
	list-style: none; margin: 0 auto; padding: 18px 0 6px;
	width: 100%; max-width: 100%;
	display: flex; flex-direction: column; gap: 34px;
}

.ml-jr-node { position: relative; width: 160px; height: 68px; margin: 0 auto; }

.ml-jr-link {
	position: absolute; left: 0; top: -50px; z-index: 0;
	width: 160px; height: 64px; overflow: visible; pointer-events: none;
}
.ml-jr-link path { fill: none; stroke: var(--ml-border-strong); stroke-width: 13; stroke-linecap: round; }
.ml-jr-link.is-done path { stroke: var(--ml-accent); }
.ml-jr-link.is-locked path { stroke-dasharray: 9 11; }

.ml-jr-button {
	position: absolute; top: 0; left: var(--x, 80px); z-index: 1; transform: translateX(-50%);
	display: block; width: 72px; height: 68px; text-decoration: none;
	transition: transform .16s ease;
}
.ml-jr-button:hover { transform: translateX(-50%) translateY(-3px); }
.ml-jr-button:active { transform: translateX(-50%) translateY(2px); }

.ml-jr-hex {
	position: relative; display: block; width: 72px; height: 68px;
	clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
	background: var(--ml-border-strong);
	filter: drop-shadow(0 5px 0 color-mix(in srgb, var(--ml-shadow-color) 10%, transparent));
}
.ml-jr-face {
	position: absolute; inset: 5px 4px;
	clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
	background: var(--ml-surface);
	transition: background .2s ease;
}
.ml-jr-glyph {
	position: absolute; inset: 0; display: grid; place-items: center;
	font-size: 17px; font-weight: 900; color: var(--ml-text-2); line-height: 1;
}

.ml-jr-node.is-done .ml-jr-hex { background: var(--ml-accent-shade); }
.ml-jr-node.is-done .ml-jr-face { background: var(--ml-accent); }
.ml-jr-node.is-done .ml-jr-glyph { color: var(--ml-on-accent); }

.ml-jr-node.is-current .ml-jr-hex { background: var(--ml-info-shade); }
.ml-jr-node.is-current .ml-jr-face { background: var(--ml-info); }
.ml-jr-node.is-current .ml-jr-glyph { color: var(--ml-on-accent); font-size: 15px; }
.ml-jr-node.is-current .ml-jr-hex { filter: drop-shadow(0 5px 0 color-mix(in srgb, var(--ml-shadow-color) 14%, transparent)) drop-shadow(0 0 0 6px color-mix(in srgb, var(--ml-info) 14%, transparent)); }

.ml-jr-node.is-open .ml-jr-hex { background: var(--ml-border-strong); }
.ml-jr-node.is-open .ml-jr-face { background: var(--ml-surface); }
.ml-jr-node.is-open .ml-jr-glyph { color: var(--ml-info-ink); }

.ml-jr-node.is-locked .ml-jr-hex { background: var(--ml-border-strong); filter: drop-shadow(0 4px 0 color-mix(in srgb, var(--ml-shadow-color) 7%, transparent)); }
.ml-jr-node.is-locked .ml-jr-face { background: var(--ml-surface-2); }
.ml-jr-node.is-locked .ml-jr-glyph { font-size: 14px; opacity: .75; }
.ml-jr-node.is-locked .ml-jr-button:hover { transform: translateX(-50%); }

.ml-jr-pop {
	position: absolute; top: 78px; left: 50%; transform: translateX(-50%) translateY(4px);
	width: 250px; max-width: calc(100vw - 32px); z-index: 5;
	display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
	background: var(--ml-surface); border: 1.5px solid var(--ml-border); border-radius: 16px;
	box-shadow: var(--ml-shadow); padding: 12px 14px;
	opacity: 0; visibility: hidden; pointer-events: none;
	transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.ml-jr-pop::before {
	content: ""; position: absolute; top: -7px; left: 50%; width: 12px; height: 12px;
	transform: translateX(-50%) rotate(45deg);
	background: var(--ml-surface); border-left: 1.5px solid var(--ml-border); border-top: 1.5px solid var(--ml-border);
}
.ml-jr-node:hover .ml-jr-pop,
.ml-jr-node:focus-within .ml-jr-pop { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.ml-jr-pop-title { font-size: 12.5px; font-weight: 900; color: var(--ml-text); line-height: 1.7; }
.ml-jr-pop-meta { font-size: 11px; font-weight: 700; color: var(--ml-text-muted); }
.ml-jr-pop-cta {
	margin-top: 2px; width: 100%; text-align: center;
	background: var(--ml-accent); color: var(--ml-on-accent); border-radius: 10px;
	padding: 7px 12px; font-size: 11.5px; font-weight: 900;
	box-shadow: 0 3px 0 var(--ml-accent-shade);
}
.ml-jr-node.is-locked .ml-jr-pop-cta { background: var(--ml-info); box-shadow: 0 3px 0 var(--ml-info-shade); }

.ml-jr-upnext {
	display: flex; flex-direction: column; gap: 4px;
	width: 100%; max-width: 460px; margin: 0 auto;
	background: var(--ml-surface); border: 1.5px solid var(--ml-border); border-radius: 18px;
	padding: 14px 16px; box-shadow: var(--ml-shadow-sm); color: var(--ml-text);
}
.ml-jr-upnext-label { font-size: 10.5px; font-weight: 900; letter-spacing: .04em; color: var(--ml-text-muted); }
.ml-jr-upnext-title { font-size: 13.5px; font-weight: 900; }
.ml-jr-upnext-cta { margin-top: 4px; font-size: 12px; font-weight: 900; color: var(--ml-accent-ink); }
.ml-jr-upnext.is-finished { background: var(--ml-success-bg); border-color: color-mix(in srgb, var(--ml-accent) 30%, var(--ml-border)); }

.ml-jr-node.is-revealed .ml-jr-pop { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.ml-jr-button.is-static { cursor: default; }
.ml-jr-button.is-static:hover,
.ml-jr-button.is-static:active { transform: translateX(-50%); }

.ml-jr-empty {
	background: var(--ml-surface); border: 1.5px dashed var(--ml-border-strong); border-radius: 22px;
	padding: 36px 24px; text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.ml-jr-empty span { font-size: 30px; }
.ml-jr-empty h2 { font-size: 17px; }
.ml-jr-empty p { font-size: 12.5px; color: var(--ml-text-muted); }

/* ---------- Program: steps with sections ---------- */

.ml-pl {
	list-style: none; margin: 0; padding: 0;
	display: flex; flex-direction: column; gap: 12px;
}
.ml-pl-step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start; }
.ml-pl-rail { position: relative; display: flex; justify-content: center; }
.ml-pl-rail::before {
	content: ""; position: absolute; left: 50%; transform: translateX(-50%);
	top: 36px; bottom: -12px; width: 2px; border-radius: 2px; background: var(--ml-border-strong);
}
.ml-pl-step:last-child .ml-pl-rail::before { content: none; }
.ml-pl-num {
	position: relative; z-index: 1;
	width: 32px; height: 32px; border-radius: 50%;
	display: grid; place-items: center;
	font-size: 13px; font-weight: 800; line-height: 1;
	color: var(--ml-text-2); background: var(--ml-surface);
	border: 2px solid var(--ml-border-strong); box-shadow: 0 0 0 5px var(--ml-bg);
}
.ml-pl-num.is-current { color: var(--ml-on-info); background: var(--ml-info); border-color: var(--ml-info); }
.ml-pl-num.is-done {
	color: var(--ml-accent-ink); background: var(--ml-success-bg);
	border-color: color-mix(in srgb, var(--ml-accent) 45%, var(--ml-border));
}

.ml-pl-main { min-width: 0; display: flex; flex-direction: column; gap: 10px; }

.ml-pl-card {
	display: flex; flex-direction: column; gap: 9px;
	background: var(--ml-surface); border: 1.5px solid var(--ml-border); border-radius: 18px;
	padding: 14px 16px; color: var(--ml-text); box-shadow: var(--ml-shadow-sm);
	transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.ml-pl-card:hover {
	color: var(--ml-text); transform: translateY(-2px);
	border-color: color-mix(in srgb, var(--pl-track, var(--ml-info)) 38%, var(--ml-border));
	box-shadow: var(--ml-shadow);
}
.ml-pl-card-top { display: flex; align-items: center; gap: 11px; }
.ml-pl-icon {
	width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px;
	display: grid; place-items: center; font-size: 21px;
	background: color-mix(in srgb, var(--pl-track, var(--ml-info)) 10%, var(--ml-surface));
	border: 1px solid color-mix(in srgb, var(--pl-track, var(--ml-info)) 22%, var(--ml-border));
}
.ml-pl-head { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ml-pl-kicker { font-size: 10px; font-weight: 900; color: var(--ml-text-muted); }
.ml-pl-title { font-size: 14px; font-weight: 900; line-height: 1.6; }
.ml-pl-sub { font-size: 11.5px; line-height: 1.8; color: var(--ml-text-muted); }
.ml-pl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ml-pl-chip {
	font-size: 10.5px; font-weight: 800; color: var(--ml-text-2);
	background: var(--ml-surface-2); border-radius: 999px; padding: 3px 9px;
}
.ml-pl-chip.is-paid { color: var(--ml-warning-ink); background: var(--ml-warning-bg); }
.ml-pl-chip.is-locked { color: var(--ml-text-muted); }

.ml-lab-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ml-lab-card {
	display: flex; flex-direction: column; gap: 6px;
	background: var(--ml-surface); border: 1.5px solid var(--ml-border); border-radius: 18px;
	padding: 16px 18px; color: var(--ml-text); box-shadow: var(--ml-shadow-sm);
	transition: border-color .16s ease, transform .16s ease;
}
.ml-lab-card:hover { color: var(--ml-text); border-color: color-mix(in srgb, var(--ml-info) 32%, var(--ml-border)); transform: translateY(-2px); }
.ml-lab-icon { font-size: 24px; line-height: 1; }
.ml-lab-title { font-size: 14px; font-weight: 900; }
.ml-lab-sub { font-size: 12px; line-height: 1.9; color: var(--ml-text-muted); }
.ml-lab-cta { margin-top: 2px; font-size: 12px; font-weight: 900; color: var(--ml-accent-ink); }
.ml-pl-progress { height: 7px; border-radius: 999px; background: var(--ml-surface-2); overflow: hidden; }
.ml-pl-progress i { display: block; height: 100%; border-radius: inherit; background: var(--ml-accent); }
.ml-pl-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ml-pl-count { font-size: 11px; font-weight: 700; color: var(--ml-text-muted); }
.ml-pl-cta {
	font-size: 11px; font-weight: 900; color: var(--ml-on-track);
	background: var(--pl-track, var(--ml-info)); border-radius: 10px; padding: 6px 12px;
	box-shadow: 0 3px 0 color-mix(in srgb, var(--pl-track, var(--ml-info)) 65%, var(--ml-shade));
}

.ml-pl-subs { display: flex; flex-direction: column; gap: 6px; padding-inline-start: 4px; }
.ml-pl-subs-label { font-size: 10px; font-weight: 900; letter-spacing: .04em; color: var(--ml-text-muted); }
.ml-pl-subs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ml-pl-sub-row { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 8px; align-items: center; }
.ml-pl-sub-row:not(:last-child)::after {
	content: ""; position: absolute; inset-inline-start: 19px; top: 26px; bottom: -7px;
	width: 2px; border-radius: 2px; background: var(--ml-border-strong);
}
.ml-pl-sub-dot {
	position: relative; z-index: 1; justify-self: center;
	min-width: 32px; height: 24px; padding: 0 7px; border-radius: 999px;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 10.5px; font-weight: 800; line-height: 1;
	color: var(--ml-text-2); background: var(--ml-surface); border: 1.5px solid var(--ml-border-strong);
}
.ml-pl-sub-link {
	display: flex; align-items: center; gap: 10px;
	min-height: 44px; padding: 8px 12px;
	background: var(--ml-surface); border: 1.5px solid var(--ml-border); border-radius: 13px;
	color: var(--ml-text); transition: border-color .15s ease, box-shadow .15s ease;
}
.ml-pl-sub-link:hover { color: var(--ml-text); border-color: color-mix(in srgb, var(--ml-info) 32%, var(--ml-border)); box-shadow: var(--ml-shadow-sm); }
.ml-pl-sub-link strong { flex: 1; min-width: 0; font-size: 12px; font-weight: 800; line-height: 1.7; }
.ml-pl-sub-meta { display: flex; gap: 8px; font-size: 10px; font-weight: 800; color: var(--ml-text-muted); white-space: nowrap; }
.ml-pl-sub-meta .is-done { color: var(--ml-accent-ink); }
.ml-pl-sub-arrow { color: var(--ml-text-muted); opacity: .55; font-size: 12px; }

@media (max-width: 620px) {
	.ml-pl-step { grid-template-columns: 28px minmax(0, 1fr); gap: 9px; }
	.ml-pl-num { width: 28px; height: 28px; font-size: 12px; }
	.ml-pl-sub-meta { display: none; }
}

@media (max-width: 620px) {
	.ml-jr-path { max-width: 100%; }
	.ml-jr-pop { width: 210px; }
}
@media (max-width: 620px) {
	.ml-unit-main .ml-section-head { display: block; margin-top: 26px; }
	.ml-unit-main .ml-section-head h2 { font-size: 21px; line-height: 1.5; }
	.ml-unit-main .ml-section-head p { margin-top: 5px; font-size: 12.5px; line-height: 1.8; }
}

/* ---------- Code exercise (editor + Pyodide checks) ---------- */
.ml-exercise { display: flex; flex-direction: column; gap: 14px; }
.ml-ex-hint { background: var(--ml-warning-bg); border: 1px solid var(--ml-warning-border); color: var(--ml-warning-fg); border-radius: 14px; padding: 10px 14px; font-size: 14px; line-height: 1.9; }
.ml-editor-wrap { border: 1px solid var(--ml-code-border); border-radius: 18px; overflow: hidden; background: var(--ml-code-bg); box-shadow: var(--ml-shadow-sm); }
.ml-editor-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; background: var(--ml-code-bar); color: var(--ml-code-bar-fg); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.ml-editor-bar span:last-child { color: var(--ml-code-muted); }
.ml-editor { display: block; width: 100%; min-height: 190px; padding: 14px; border: 0; outline: none; resize: vertical; background: var(--ml-code-bg); color: var(--ml-code-fg); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; line-height: 1.9; tab-size: 4; unicode-bidi: plaintext; }
.ml-editor:focus { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ml-accent) 45%, transparent); }
.ml-console { border: 1px solid var(--ml-code-border); border-radius: 16px; overflow: hidden; background: var(--ml-code-bg); }
.ml-console-head { padding: 7px 14px; border-bottom: 1px solid var(--ml-code-border); background: var(--ml-code-bar); color: var(--ml-code-bar-fg); font-size: 12px; font-weight: 800; }
.ml-console pre { margin: 0; padding: 12px 14px; max-height: 180px; overflow: auto; color: var(--ml-code-fg); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.8; white-space: pre-wrap; direction: ltr; text-align: left; }
.ml-checks { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ml-check { display: flex; align-items: flex-start; gap: 9px; padding: 10px 14px; border: 1px solid var(--ml-border); border-radius: 14px; background: var(--ml-surface); font-size: 14px; }
.ml-check-ic { flex: none; width: 20px; text-align: center; }
.ml-check-label { font-weight: 800; }
.ml-check-note { display: block; margin-top: 3px; color: var(--ml-text-muted); font-size: 12.5px; direction: ltr; text-align: left; }
.ml-check.is-ok { border-color: var(--ml-success-border); background: var(--ml-success-bg); }
.ml-check.is-bad { border-color: var(--ml-danger-border); background: var(--ml-danger-bg); }
@media (max-width: 600px) {
	.ml-editor { min-height: 160px; font-size: 13px; }
}

/* ---------- Plans page ---------- */
.ml-plans-head { text-align: center; max-width: 720px; margin: 18px auto 26px; display: grid; gap: 10px; justify-items: center; }
.ml-plans-head p { line-height: 2; margin: 0; }
.ml-plans-status { background: var(--ml-surface-2); border-radius: 14px; padding: 8px 14px; }
.ml-plans-status.is-on { background: var(--ml-accent-soft); color: var(--ml-accent-ink); }
.ml-plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; max-width: 880px; margin: 0 auto; }
.ml-plan { position: relative; background: var(--ml-surface); border: 2px solid var(--ml-border); border-radius: var(--ml-radius); padding: 26px 20px; text-align: center; display: grid; gap: 8px; box-shadow: var(--ml-shadow-sm); }
.ml-plan.is-popular { border-color: var(--ml-accent); box-shadow: var(--ml-shadow); }
.ml-plan-badge { position: absolute; top: -13px; inset-inline-start: 50%; transform: translateX(50%); background: var(--ml-accent); color: var(--ml-on-accent); font-size: 13px; font-weight: 700; border-radius: 999px; padding: 3px 12px; }
.ml-plan h2 { font-size: 22px; }
.ml-plan-price { margin: 4px 0 0; display: grid; gap: 2px; }
.ml-plan-price strong { font-size: 22px; }
.ml-plan-price del { color: var(--ml-text-muted); font-size: 14px; }
.ml-plan-month { color: var(--ml-text-muted); margin: 0; }
.ml-plan-saving { color: var(--ml-accent-ink); font-weight: 700; margin: 0; }
.ml-plan-buy { margin-top: 8px; }
.ml-plans-courses { max-width: 880px; margin: 34px auto 0; background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: var(--ml-radius); padding: 22px; }
.ml-plans-courses h2 { font-size: 18px; margin-bottom: 12px; }
.ml-plans-courses ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 12px; padding: 0; }
.ml-plans-courses li a { display: inline-block; background: var(--ml-surface-2); border-radius: 12px; padding: 6px 12px; color: var(--ml-text); text-decoration: none; }
.ml-paywall-off { display: inline-block; margin-inline-start: 8px; background: var(--ml-danger-bg); color: var(--ml-danger); border-radius: 10px; padding: 2px 8px; font-size: 13px; font-weight: 700; }

/* ---------- Code exercises: prompt, tools, results ---------- */
.ml-ex-prompt { line-height: 2; font-size: 15px; color: var(--ml-text-2); }
.ml-ex-prompt p { margin: 0 0 8px; }
.ml-ex-prompt ol, .ml-ex-prompt ul { margin: 0 0 8px; padding-inline-start: 22px; }
.ml-ex-prompt code, .ml-ex-hint code { direction: ltr; unicode-bidi: isolate; background: var(--ml-code-inline-bg); color: var(--ml-code-inline-fg); border-radius: 6px; padding: 1px 6px; font-size: 13px; }
.ml-ex-prompt pre, .ml-ex-hint pre, .ml-ex-solution pre { direction: ltr; text-align: left; background: var(--ml-code-bg); color: var(--ml-code-fg); border: 1px solid var(--ml-code-border); border-radius: 12px; padding: 10px 14px; overflow: auto; font-size: 13px; line-height: 1.8; margin: 6px 0; }
.ml-ex-hints { display: flex; flex-direction: column; gap: 8px; }
.ml-ex-hints:empty { display: none; }
.ml-ex-solution { border: 1px dashed var(--ml-border-strong); border-radius: 14px; padding: 10px 14px; background: var(--ml-surface); }
.ml-ex-solution-head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 14px; }
.ml-ex-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ml-console #ml-out pre { margin: 0; padding: 12px 14px; max-height: 220px; overflow: auto; color: var(--ml-code-fg); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.8; white-space: pre-wrap; direction: ltr; text-align: left; }
.ml-sql-table { max-height: 260px; overflow: auto; }
.ml-sql-table table { border-collapse: collapse; width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.ml-sql-table th, .ml-sql-table td { border-bottom: 1px solid var(--ml-border); padding: 6px 10px; text-align: left; white-space: nowrap; }
.ml-sql-table th { position: sticky; top: 0; background: var(--ml-surface-2); }
.ml-sql-table i { color: var(--ml-text-muted); }
.ml-sql-count { color: var(--ml-text-muted); font-size: 12px; padding: 6px 14px; }

/* ---------- Course landing (logged-out state of /academy/<slug>/) ---------- */
.ml-ld { display: grid; gap: 22px; max-width: 920px; }
.ml-ld-hero { display: flex; gap: 20px; align-items: flex-start; background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: 28px; padding: 26px; box-shadow: var(--ml-shadow-sm); }
.ml-ld-hero-text { display: grid; gap: 10px; min-width: 0; }
.ml-ld-hero h1 { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.5; font-weight: 900; }
.ml-ld-promise { color: var(--ml-text-2); font-size: 16.5px; line-height: 1.9; margin: 0; }
.ml-ld-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ml-ld-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--ml-surface-2); color: var(--ml-text-2); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; }
.ml-ld-chip.is-free { background: var(--ml-accent-soft); color: var(--ml-accent-ink); }
.ml-ld-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.ml-ld-hex { flex: none; width: 46px; height: 46px; display: grid; place-items: center; clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%); background: var(--ml-surface-2); color: var(--ml-text-2); font-weight: 900; font-size: 15px; }
.ml-ld-hex-lg { width: 84px; height: 84px; font-size: 38px; background: color-mix(in srgb, var(--ml-course) 16%, var(--ml-surface)); }
.ml-ld-intro { font-size: 16px; line-height: 2.1; color: var(--ml-text-2); margin: 0; }
.ml-ld-block { display: grid; gap: 12px; }
.ml-ld-block h2 { font-size: 21px; font-weight: 900; }
.ml-ld-block > .ml-muted { margin: -6px 0 0; }
.ml-ld-outcomes, .ml-ld-how { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.ml-ld-card { background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: 18px; padding: 14px 16px; line-height: 1.9; display: flex; gap: 8px; }
.ml-ld-how .ml-ld-card { flex-direction: column; gap: 2px; }
.ml-ld-how .ml-ld-card span { color: var(--ml-text-muted); font-size: 14px; }
.ml-ld-check { color: var(--ml-accent-ink); font-weight: 900; }
.ml-ld-unit { background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: 22px; padding: 16px 18px; }
.ml-ld-unit h3 { font-size: 16.5px; font-weight: 800; margin-bottom: 8px; }
.ml-ld-path { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ml-ld-step { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.ml-ld-step:nth-child(even) { padding-inline-start: 26px; }
.ml-ld-step.is-first .ml-ld-hex { background: var(--ml-accent); color: var(--ml-on-accent); }
.ml-ld-step-name { line-height: 1.8; }
.ml-ld-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.ml-ld-fact { background: var(--ml-surface-2); border-radius: 18px; padding: 14px 16px; }
.ml-ld-fact > span { display: block; color: var(--ml-text-muted); font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.ml-ld-fact p, .ml-ld-fact ul { margin: 0; line-height: 1.9; }
.ml-ld-fact ul { padding-inline-start: 18px; }
.ml-ld-faq { display: grid; gap: 8px; }
.ml-ld-faq details, .ml-about { background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: 16px; padding: 12px 16px; }
.ml-ld-faq summary, .ml-about summary { cursor: pointer; font-weight: 800; }
.ml-ld-faq p { margin: 8px 0 0; line-height: 2; color: var(--ml-text-2); }
.ml-about { margin: 14px 0; line-height: 2; }
.ml-about p, .ml-about ul { margin: 8px 0 0; }
.ml-ld-related { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ml-ld-related a { display: block; background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: 14px; padding: 10px 14px; color: var(--ml-text); text-decoration: none; }
.ml-ld-related a:hover { border-color: var(--ml-course); }
.ml-ld-final { display: flex; align-items: center; gap: 14px; background: var(--ml-accent-soft); border-radius: 22px; padding: 18px 20px; }
.ml-ld-final > div:nth-child(2) { flex: 1; }
.ml-ld-final p { margin: 2px 0 0; }
.ml-ld-final .ml-ld-hex { background: var(--ml-accent); color: var(--ml-on-accent); }
@media (max-width: 640px) {
	.ml-ld-hero { flex-direction: column; padding: 20px; }
	.ml-ld-final { flex-direction: column; text-align: center; }
	.ml-ld-step:nth-child(even) { padding-inline-start: 0; }
}
.ml-plans-paths { max-width: 880px; margin: 34px auto 0; display: grid; gap: 12px; }
.ml-plans-paths > h2 { font-size: 21px; font-weight: 900; text-align: center; }
.ml-plans-paths > .ml-muted { text-align: center; margin: -6px 0 6px; }
.ml-plan-courses { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; text-align: start; }
.ml-plan-courses a { color: var(--ml-text-2); text-decoration: none; }
.ml-plan-courses li::before { content: '✓ '; color: var(--ml-accent-ink); font-weight: 900; }
.ml-ld-paths { display: grid; gap: 8px; }
.ml-ld-path-offer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--ml-warning-bg); border-radius: 16px; padding: 12px 16px; }
.ml-ld-path-offer strong { flex: 1; min-width: 200px; }

/* ---------- MLEditor: the one code editor for every course (textarea over Prism) ----------
   Python, SQL, shell, labs: all of it reads the --ml-code-* tokens, so the editor
   is light in light mode and dark in dark mode with no per-page rules.
   The textarea is an invisible input layer over the highlighted <pre>; it must stay
   transparent whatever global form styles say (sites often paint every textarea),
   so the few properties that keep it invisible are !important. */
.mle { --mle-font: ui-monospace, "Cascadia Code", "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace; display: flex; background: var(--ml-code-bg); color: var(--ml-code-fg); font: 14px/1.75 var(--mle-font); direction: ltr; text-align: left; min-height: 220px; }
.mle-gutter { flex: none; padding: 14px 10px 14px 14px; color: var(--ml-code-gutter-fg); text-align: right; user-select: none; border-right: 1px solid var(--ml-code-border); background: var(--ml-code-gutter-bg); font-variant-numeric: tabular-nums; }
.mle-gutter span { display: block; }
.mle-body { position: relative; flex: 1; min-width: 0; overflow-x: auto; }
.mle .mle-hl, .mle .mle-input { margin: 0; padding: 14px 16px; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; font: inherit; letter-spacing: 0; tab-size: 4; white-space: pre; word-wrap: normal; overflow-wrap: normal; }
.mle .mle-hl { pointer-events: none; background: transparent !important; color: var(--ml-code-fg) !important; min-height: 100%; overflow: hidden; }
.mle .mle-hl code { font: inherit; background: none !important; border: 0 !important; padding: 0; color: inherit !important; }
.mle .mle-input { position: absolute; inset: 0; width: 100%; resize: none; outline: none; background: transparent !important; color: transparent !important; -webkit-text-fill-color: transparent !important; caret-color: var(--ml-code-caret); overflow: hidden; }
/* Selection: a translucent wash over the coloured code underneath, readable in both themes. */
.mle .mle-input::selection { background: var(--ml-code-selection); color: transparent; -webkit-text-fill-color: transparent; }
.mle .mle-hl::selection, .mle .mle-hl *::selection { background: transparent; }
.mle:focus-within { box-shadow: inset 0 0 0 2px var(--ml-code-focus); }

/* Prism token colours: one set for the editor, lesson code blocks, hints and answers. */
.ml-app .token.comment, .ml-app .token.prolog, .ml-app .token.doctype, .ml-app .token.cdata { color: var(--ml-code-comment); font-style: italic; }
.ml-app .token.punctuation { color: var(--ml-code-punctuation); }
.ml-app .token.operator, .ml-app .token.entity, .ml-app .token.url { color: var(--ml-code-operator); }
.ml-app .token.keyword, .ml-app .token.atrule, .ml-app .token.important { color: var(--ml-code-keyword); }
.ml-app .token.string, .ml-app .token.char, .ml-app .token.attr-value, .ml-app .token.triple-quoted-string, .ml-app .token.selector, .ml-app .token.attr-name { color: var(--ml-code-string); }
.ml-app .token.number, .ml-app .token.boolean, .ml-app .token.constant, .ml-app .token.symbol { color: var(--ml-code-number); }
.ml-app .token.function { color: var(--ml-code-function); }
.ml-app .token.class-name { color: var(--ml-code-class); }
.ml-app .token.builtin { color: var(--ml-code-builtin); }
.ml-app .token.property, .ml-app .token.tag { color: var(--ml-code-property); }
.ml-app .token.decorator, .ml-app .token.annotation { color: var(--ml-code-decorator); }
.ml-app .token.regex, .ml-app .token.variable { color: var(--ml-code-variable); }
.ml-body .token.keyword { font-weight: 700; }

.ml-editor-bar { display: flex; gap: 10px; align-items: center; }
.ml-editor-bar #ml-run-state { margin-inline-start: auto; }
.ml-editor-dots { display: inline-flex; gap: 5px; }
.ml-editor-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--ml-code-dot-1); }
.ml-editor-dots i:nth-child(2) { background: var(--ml-code-dot-2); }
.ml-editor-dots i:nth-child(3) { background: var(--ml-code-dot-3); }
.ml-editor-keys { color: var(--ml-code-muted); font-size: 11px; border: 1px solid var(--ml-code-border); border-radius: 6px; padding: 0 6px; }

/* ---------- Coding step: wide two-column player ---------- */
.ml-ex-split { display: flex; flex-direction: column; gap: 14px; }
.ml-ex-brief, .ml-ex-work { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (min-width: 1024px) {
	.ml-player.is-coding { max-width: 1240px; }
	.ml-player.is-coding .ml-ex-split { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; gap: 26px; }
	.ml-player.is-coding .ml-ex-work { position: sticky; top: 0; }
	.ml-player.is-coding .mle { min-height: 340px; }
	.ml-player.is-coding .ml-ex-brief { padding-inline-end: 4px; }
}

/* ---------- Code playground (labs) ---------- */
.ml-pg-shell { max-width: 1320px; margin: 0 auto; padding: 0 18px; display: grid; gap: 18px; }
.ml-pg-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; }
.ml-pg-heading { display: grid; gap: 6px; }
.ml-pg-heading h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 900; }
.ml-pg-heading p { margin: 0; line-height: 1.9; }
.ml-pg-switch { display: inline-flex; background: var(--ml-surface-2); border-radius: 16px; padding: 4px; gap: 4px; }
.ml-pg-switch a { padding: 8px 16px; border-radius: 12px; font-weight: 800; color: var(--ml-text-2); text-decoration: none; }
.ml-pg-switch a.is-on { background: var(--ml-surface); color: var(--ml-text); box-shadow: var(--ml-shadow-sm); }
.ml-pg-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.ml-pg-side { display: grid; gap: 14px; position: sticky; top: 14px; }
.ml-pg-card { background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: 20px; padding: 16px; display: grid; gap: 10px; }
.ml-pg-card h2 { font-size: 15px; font-weight: 900; }
.ml-pg-small { font-size: 12.5px; margin: 0; line-height: 1.8; }
.ml-pg-snippets { display: grid; gap: 6px; }
.ml-pg-snippet { text-align: start; background: var(--ml-surface-2); border: 0; border-radius: 12px; padding: 9px 12px; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--ml-text-2); cursor: pointer; transition: background .15s, transform .12s; }
.ml-pg-snippet:hover { background: var(--ml-accent-soft); color: var(--ml-accent-ink); transform: translateX(-2px); }
.ml-pg-tables { display: grid; gap: 6px; max-height: 420px; overflow: auto; }
.ml-pg-table { display: grid; gap: 2px; text-align: left; background: var(--ml-surface-2); border: 1px solid var(--ml-border); border-radius: 12px; padding: 8px 10px; cursor: pointer; font: inherit; }
.ml-pg-table:hover { border-color: var(--ml-info); background: var(--ml-info-soft); }
.ml-pg-table strong { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: var(--ml-text); }
.ml-pg-table small { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; color: var(--ml-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-pg-tips { margin: 0; padding-inline-start: 18px; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.9; color: var(--ml-text-2); }
.ml-pg-work { display: grid; gap: 12px; min-width: 0; }
.ml-pg-work .mle { min-height: 320px; }
.ml-pg-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ml-pg-state { margin-inline-start: auto; font-size: 12px; color: var(--ml-code-muted); }
.ml-pg-state.is-busy { color: var(--ml-code-warn); }
.ml-pg-state.is-ok { color: var(--ml-code-ok); }
.ml-pg-state.is-bad { color: var(--ml-code-error); }
.ml-pg-out { background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: 18px; overflow: hidden; }
.ml-pg-out-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--ml-border); font-size: 13.5px; }
.ml-pg-out-body { padding: 14px 16px; min-height: 140px; max-height: 480px; overflow: auto; }
.ml-pg-out-body p { margin: 0; }
.ml-pg-console, .ml-pg-error { margin: 0; direction: ltr; text-align: left; white-space: pre-wrap; font: 13.5px/1.8 ui-monospace, Menlo, Consolas, monospace; color: var(--ml-code-fg); }
.ml-pg-console.has-error, .ml-pg-error { color: var(--ml-code-error); }
.ml-pg-okmsg { color: var(--ml-accent-ink); font-weight: 700; }
.ml-pg-out .ml-sql-table { max-height: 440px; }
@media (max-width: 900px) {
	.ml-pg-grid { grid-template-columns: 1fr; }
	.ml-pg-side { position: static; order: 2; }
	.ml-pg-work { order: 1; }
}

/* Editor title bar reads like a code window: window buttons on the left, LTR. */
.ml-editor-bar { direction: ltr; }
.ml-editor-bar #ml-run-state, .ml-editor-bar .ml-pg-state { margin-inline-start: auto; direction: rtl; }

/* ============================================================
   Simplified flow (v4.3): one course map, stats bar, one offer,
   one catalog grid
   ============================================================ */

/* --- Slim stats bar (course page + academy home) --- */
.ml-statsbar {
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
	margin: 0 0 18px;
}
.ml-statsbar-item {
	display: inline-flex; align-items: center; gap: 6px;
	background: var(--ml-surface); border: 1px solid var(--ml-border); border-radius: 999px;
	padding: 7px 14px; font-size: 13px; font-weight: 700; color: var(--ml-text-muted);
	box-shadow: var(--ml-shadow-sm); white-space: nowrap;
}
.ml-statsbar-item b { color: var(--ml-text); font-weight: 900; }
.ml-statsbar-item small { font-size: 11.5px; font-weight: 700; }
.ml-statsbar-item.is-streak b { color: var(--ml-streak); }
.ml-statsbar-item.is-hearts b { color: var(--ml-heart); }
.ml-statsbar-bar { display: inline-block; width: 56px; height: 7px; border-radius: 999px; background: var(--ml-surface-2); overflow: hidden; }
.ml-statsbar-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ml-accent); }

/* --- The one paid-course offer --- */
.ml-offer {
	display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
	background: var(--ml-surface); border: 1.5px solid var(--ml-border); border-radius: 20px;
	padding: 18px 20px; margin: 0 auto 22px; max-width: 520px; box-shadow: var(--ml-shadow-sm);
}
.ml-offer-note { font-size: 13px; font-weight: 700; color: var(--ml-text-2); line-height: 1.9; margin: 0; }
.ml-offer-buy { width: 100%; max-width: 380px; }
.ml-offer-plans { font-size: 12.5px; font-weight: 800; color: var(--ml-text-muted); text-decoration: underline; text-underline-offset: 4px; }
.ml-offer-plans:hover { color: var(--ml-accent-ink); }
.ml-paywall .ml-offer { border: 0; box-shadow: none; background: transparent; padding: 0; margin-top: 18px; }

/* --- Course map: every unit is a section of one scrolling path --- */
.ml-map-shell { max-width: 760px; }
.ml-map { display: flex; flex-direction: column; gap: 22px; }
.ml-unit-sec {
	scroll-margin-top: 90px;
	background: var(--ml-surface); border: 1.5px solid var(--ml-border); border-radius: 24px;
	padding: 16px 16px 26px; box-shadow: var(--ml-shadow-sm);
	transition: border-color .3s ease, box-shadow .3s ease;
}
.ml-unit-sec.is-current { border-color: color-mix(in srgb, var(--unit) 45%, var(--ml-border)); }
.ml-unit-sec.is-target { box-shadow: 0 0 0 4px color-mix(in srgb, var(--unit) 22%, transparent), var(--ml-shadow-sm); }
.ml-unit-sec-head {
	display: flex; align-items: center; gap: 12px;
	padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--ml-border);
}
.ml-unit-sec-icon {
	width: 44px; height: 44px; flex: 0 0 44px; border-radius: 14px;
	display: grid; place-items: center; font-size: 22px;
	background: color-mix(in srgb, var(--unit) 16%, var(--ml-surface));
}
.ml-unit-sec-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ml-unit-sec-kicker { font-size: 11px; font-weight: 900; letter-spacing: .04em; color: var(--unit); }
.ml-unit-sec-title { font-size: 17px; font-weight: 900; line-height: 1.6; }
.ml-unit-sec.is-done .ml-jr-score { background: var(--ml-success-bg); color: var(--ml-accent-ink); }

/* Current node: a small flag above the hex and a gentle pulse. */
.ml-jr-flag {
	position: absolute; top: -30px; left: var(--x, 80px); z-index: 3; transform: translateX(-50%);
	background: var(--ml-surface); color: var(--ml-info-ink); border: 2px solid var(--ml-border);
	border-radius: 10px; padding: 2px 10px; font-size: 11.5px; font-weight: 900; white-space: nowrap;
	box-shadow: var(--ml-shadow-sm); animation: ml-jr-bob 1.6s ease-in-out infinite;
}
@keyframes ml-jr-bob {
	0%, 100% { transform: translateX(-50%) translateY(0); }
	50% { transform: translateX(-50%) translateY(-4px); }
}
.ml-jr-node.is-current .ml-jr-button { animation: ml-jr-pulse 1.9s ease-in-out infinite; }
@keyframes ml-jr-pulse {
	0%, 100% { filter: drop-shadow(0 0 0 transparent); }
	50% { filter: drop-shadow(0 0 10px color-mix(in srgb, var(--ml-info) 55%, transparent)); }
}
@media (prefers-reduced-motion: reduce) {
	.ml-jr-flag, .ml-jr-node.is-current .ml-jr-button { animation: none; }
}

/* --- Academy home: continue card, one grid, lab row --- */
.ml-continue-card {
	display: flex; align-items: center; gap: 16px; margin: 0 0 26px;
	background: var(--ml-surface); border: 1.5px solid color-mix(in srgb, var(--track) 35%, var(--ml-border));
	border-radius: 22px; padding: 16px 18px; box-shadow: var(--ml-shadow); color: var(--ml-text);
	transition: transform .16s ease, box-shadow .16s ease;
}
.ml-continue-card:hover { transform: translateY(-2px); color: var(--ml-text); box-shadow: var(--ml-shadow-lg, var(--ml-shadow)); }
.ml-continue-hex {
	width: 60px; height: 56px; flex: 0 0 60px; display: grid; place-items: center;
	clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
	background: var(--track); color: var(--ml-on-track); font-size: 20px; font-weight: 900;
}
.ml-continue-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ml-continue-kicker { font-size: 11.5px; font-weight: 900; color: var(--ml-text-muted); }
.ml-continue-title { font-size: 16px; font-weight: 900; line-height: 1.6; }
.ml-continue-meta { font-size: 11px; font-weight: 700; color: var(--ml-text-muted); }

.ml-course-cover.is-icon {
	display: grid; place-items: center;
	background: linear-gradient(140deg, color-mix(in srgb, var(--track) 55%, var(--ml-cover-bg)) 0%, var(--track) 100%);
}
.ml-course-cover-icon { font-size: 64px; line-height: 1; filter: drop-shadow(0 8px 14px color-mix(in srgb, var(--ml-shade) 25%, transparent)); transition: transform .5s ease; }
.ml-course-card:hover .ml-course-cover-icon { transform: scale(1.08); }
.ml-course-kicker.is-free { background: var(--ml-accent); color: var(--ml-on-accent); }
.ml-course-desc.is-one-line { -webkit-line-clamp: 1; }

.ml-lab-row {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 26px;
	background: var(--ml-surface); border: 1px dashed var(--ml-border-strong); border-radius: 18px; padding: 12px 16px;
}
.ml-lab-row-title { font-size: 13.5px; font-weight: 900; color: var(--ml-text-2); margin-inline-end: auto; }
.ml-lab-row-link {
	background: var(--ml-surface-2); border: 1px solid var(--ml-border); border-radius: 12px;
	padding: 7px 14px; font-size: 12.5px; font-weight: 800; color: var(--ml-text-2);
}
.ml-lab-row-link:hover { border-color: var(--ml-info); color: var(--ml-info-ink); }

@media (max-width: 620px) {
	.ml-unit-sec { padding: 14px 10px 22px; border-radius: 20px; }
	.ml-continue-card { gap: 12px; padding: 14px; }
	.ml-continue-card .ml-course-cta { display: none; }
	.ml-continue-hex { width: 50px; height: 46px; flex-basis: 50px; }
	.ml-statsbar-item small { display: none; }
}

/* Lesson navigation lives at the bottom, next to the main button. */
.ml-player-nav { display: none; }
.ml-player-actions { gap: 10px; }
.ml-back-btn { margin-inline-end: auto; }

/* ==========================================================================
   Course landing (v4.4): orange site theme, one action, connected hex road.
   ========================================================================== */
.ml-lp {
	--lp-o: var(--ml-accent);
	--lp-o2: var(--ml-accent-2);
	--lp-o3: var(--ml-accent-3);
	--lp-o-dark: var(--ml-accent-shade);
	--lp-o-soft: color-mix(in srgb, var(--ml-accent) 10%, var(--ml-surface));
	--lp-o-line: color-mix(in srgb, var(--ml-accent) 26%, var(--ml-border));
	background:
		radial-gradient(900px 480px at 85% -8%, color-mix(in srgb, var(--ml-accent) 14%, transparent), transparent 70%),
		radial-gradient(700px 420px at 0% 30%, color-mix(in srgb, var(--ml-accent-3) 10%, transparent), transparent 70%),
		var(--ml-bg);
	padding: 0 0 40px;
}
.ml-lp-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.ml-lp .ml-preview-note { margin-top: 16px; }

/* Buttons */
.ml-lp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 52px; padding: 0 26px; border-radius: 16px;
	font-weight: 900; font-size: 16px; text-decoration: none; white-space: nowrap;
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.ml-lp-btn:active { transform: translateY(2px); }
.ml-lp-btn-main {
	background: linear-gradient(180deg, var(--lp-o2), var(--lp-o)); color: var(--ml-on-accent);
	box-shadow: 0 4px 0 var(--lp-o-dark), 0 14px 30px -12px color-mix(in srgb, var(--ml-accent) 75%, transparent);
}
.ml-lp-btn-main:hover { color: var(--ml-on-accent); transform: translateY(-1px); box-shadow: 0 5px 0 var(--lp-o-dark), 0 18px 34px -12px color-mix(in srgb, var(--ml-accent) 85%, transparent); }
.ml-lp-btn-ghost { background: var(--ml-surface); color: var(--ml-text); border: 2px solid var(--lp-o-line); }
.ml-lp-btn-ghost:hover { color: var(--ml-accent-ink); border-color: var(--lp-o); }
.ml-lp-btn-light { background: var(--ml-highlight); color: var(--lp-o-dark); box-shadow: 0 4px 0 color-mix(in srgb, var(--ml-shade) 14%, transparent); }
.ml-lp-btn-light:hover { color: var(--lp-o-dark); transform: translateY(-1px); }

/* Hero */
.ml-lp-hero { padding: 34px 0 26px; }
.ml-lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; }
.ml-lp-hero-text { display: grid; gap: 16px; min-width: 0; }
.ml-lp-eyebrow {
	justify-self: start; display: inline-flex; align-items: center; gap: 6px;
	padding: 6px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 800;
	color: var(--ml-accent-ink); background: var(--lp-o-soft); border: 1px solid var(--lp-o-line);
}
.ml-lp-hero h1 { font-size: clamp(28px, 4.2vw, 46px); line-height: 1.4; font-weight: 900; letter-spacing: -.3px; }
.ml-lp-promise { margin: 0; color: var(--ml-text-2); font-size: 17.5px; line-height: 2; }
.ml-lp-stats { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ml-lp-stats li {
	display: grid; gap: 2px; min-width: 92px; padding: 10px 14px; border-radius: 16px;
	background: var(--ml-surface); border: 1px solid var(--ml-border); box-shadow: var(--ml-shadow-sm);
}
.ml-lp-stats strong { font-size: 20px; font-weight: 900; color: var(--ml-accent-ink); line-height: 1.3; }
.ml-lp-stats span { font-size: 12.5px; color: var(--ml-text-muted); font-weight: 700; }
.ml-lp-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.ml-lp-cta-note { margin: 0; color: var(--ml-text-muted); font-size: 14px; font-weight: 700; }

.ml-lp-visual { position: relative; margin: 0; }
.ml-lp-cover {
	position: relative; z-index: 1; display: block; width: 100%; height: auto; aspect-ratio: 1400 / 784; object-fit: cover;
	border-radius: 26px; box-shadow: 0 30px 60px -28px color-mix(in srgb, var(--ml-shadow-warm) 55%, transparent), 0 0 0 1px color-mix(in srgb, var(--ml-accent) 22%, transparent);
}
.ml-lp-cover-empty { display: grid; place-items: center; font-size: 72px; background: linear-gradient(135deg, var(--lp-o3), var(--lp-o)); }
.ml-lp-visual::after {
	content: ""; position: absolute; z-index: 0; inset: 12% -6% -10% 18%; border-radius: 40px;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--ml-accent) 34%, transparent), transparent);
	filter: blur(20px);
}
.ml-lp-unit-n { font-size: 12px; font-weight: 900; color: var(--ml-on-accent); background: var(--lp-o); padding: 2px 9px; border-radius: 999px; }

/* Body */
.ml-lp-body { display: grid; gap: 44px; padding-top: 18px; }
.ml-lp-section { display: grid; gap: 16px; }
.ml-lp-section > h2, .ml-lp-price h2, .ml-lp-fact h2 { font-size: clamp(21px, 2.6vw, 27px); font-weight: 900; }
.ml-lp-sub { margin: -6px 0 0; color: var(--ml-text-muted); }
.ml-lp-intro { margin: 0; font-size: 17px; line-height: 2.05; color: var(--ml-text-2); max-width: 820px; }

.ml-lp-outcomes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ml-lp-outcomes li {
	display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 18px;
	background: var(--ml-surface); border: 1px solid var(--ml-border); box-shadow: var(--ml-shadow-sm); line-height: 1.85; font-weight: 600;
}
.ml-lp-tick {
	flex: 0 0 26px; height: 26px; margin-top: 2px; background: linear-gradient(135deg, var(--lp-o3), var(--lp-o));
	clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%); position: relative;
}
.ml-lp-tick::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--ml-on-accent); font-size: 13px; font-weight: 900; }

/* The road of hexes */
.ml-lp-road {
	position: relative; padding: 26px 0 8px; border-radius: 28px;
	background: var(--ml-surface); border: 1px solid var(--ml-border); box-shadow: var(--ml-shadow);
	background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ml-accent) 14%, transparent) 1px, transparent 0);
	background-size: 22px 22px;
}
.ml-lp-road::before {
	content: ""; position: absolute; inset-inline-start: 50%; transform: translateX(50%);
	top: 40px; bottom: 60px; width: 8px; border-radius: 8px;
	background: linear-gradient(180deg, var(--lp-o3), var(--lp-o) 40%, color-mix(in srgb, var(--ml-accent) 25%, var(--ml-border)));
	box-shadow: 0 0 18px color-mix(in srgb, var(--ml-accent) 45%, transparent);
}
.ml-lp-unit { position: relative; display: grid; gap: 6px; padding: 6px 0 14px; }
.ml-lp-unit-title {
	position: relative; z-index: 1; justify-self: center; display: inline-flex; gap: 8px; align-items: center;
	padding: 8px 18px; border-radius: 999px; font-size: 15.5px; font-weight: 900;
	background: var(--ml-surface); color: var(--ml-text); border: 2px solid var(--lp-o); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--ml-accent) 70%, transparent);
}
.ml-lp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ml-lp-step { position: relative; display: grid; grid-template-columns: 1fr 76px 1fr; align-items: center; min-height: 74px; }
.ml-lp-hex {
	grid-column: 2; justify-self: center; position: relative; z-index: 1; width: 64px; height: 58px;
	clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
	background: linear-gradient(135deg, var(--lp-o3), var(--lp-o)); display: grid; place-items: center;
}
.ml-lp-hex b { position: relative; z-index: 1; color: var(--ml-on-accent); font-size: 19px; font-weight: 900; }
.ml-lp-step.is-locked .ml-lp-hex { background: var(--lp-o-line); }
.ml-lp-step.is-locked .ml-lp-hex::before {
	content: ""; position: absolute; inset: 3px; background: var(--ml-surface);
	clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
}
.ml-lp-step.is-locked .ml-lp-hex b { font-size: 16px; opacity: .75; }
.ml-lp-step.is-start .ml-lp-hex { width: 76px; height: 68px; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--ml-accent) 80%, transparent)); animation: ml-lp-pulse 2.4s ease-in-out infinite; }
@keyframes ml-lp-pulse { 50% { transform: scale(1.06); } }
.ml-lp-step-name { grid-row: 1; padding: 10px 16px; font-weight: 700; line-height: 1.8; color: var(--ml-text); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.ml-lp-step:nth-child(odd) .ml-lp-step-name { grid-column: 1; justify-content: flex-end; text-align: end; }
.ml-lp-step:nth-child(even) .ml-lp-step-name { grid-column: 3; justify-content: flex-start; }
.ml-lp-step.is-locked .ml-lp-step-name { color: var(--ml-text-2); font-weight: 600; }
.ml-lp-tag { font-style: normal; font-size: 12px; font-weight: 900; padding: 3px 10px; border-radius: 999px; background: var(--lp-o); color: var(--ml-on-accent); }
.ml-lp-tag.is-soft { background: var(--lp-o-soft); color: var(--ml-accent-ink); border: 1px solid var(--lp-o-line); }
.ml-lp-finish { position: relative; z-index: 1; display: grid; place-items: center; padding: 6px 0 10px; }
.ml-lp-finish span {
	display: grid; place-items: center; width: 70px; height: 62px; font-size: 28px;
	clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
	background: linear-gradient(135deg, var(--ml-gold-1), var(--lp-o2));
}

/* How a lesson works */
.ml-lp-how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; counter-reset: lp; }
.ml-lp-how li { display: grid; gap: 6px; padding: 18px; border-radius: 20px; background: var(--ml-surface); border: 1px solid var(--ml-border); box-shadow: var(--ml-shadow-sm); }
.ml-lp-how-ic { font-size: 26px; }
.ml-lp-how strong { font-size: 16px; font-weight: 900; }
.ml-lp-how p { margin: 0; color: var(--ml-text-muted); line-height: 1.85; font-size: 14.5px; }

/* Facts */
.ml-lp-facts { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.ml-lp-fact { padding: 20px 22px; border-radius: 20px; background: var(--ml-surface); border: 1px solid var(--ml-border); display: grid; gap: 10px; align-content: start; }
.ml-lp-fact h2 { font-size: 18px !important; }
.ml-lp-fact ul { margin: 0; padding-inline-start: 18px; display: grid; gap: 6px; line-height: 1.85; }
.ml-lp-fact ul li::marker { color: var(--lp-o); }
.ml-lp-fact p { margin: 0; line-height: 1.9; color: var(--ml-text-2); }

/* Price */
.ml-lp-price {
	display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr); gap: 22px; align-items: center;
	padding: 26px; border-radius: 28px; scroll-margin-top: 90px;
	background: linear-gradient(135deg, var(--lp-o-soft), var(--ml-surface)); border: 2px solid var(--lp-o-line); box-shadow: var(--ml-shadow);
}
.ml-lp-price-text { display: grid; gap: 12px; }
.ml-lp-price-text ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ml-lp-price-text li { display: flex; gap: 8px; line-height: 1.8; font-weight: 600; }
.ml-lp-price-text li::before { content: "✓"; color: var(--lp-o); font-weight: 900; }
.ml-lp-price-box { display: grid; gap: 8px; justify-items: stretch; text-align: center; padding: 20px; border-radius: 22px; background: var(--ml-surface); border: 1px solid var(--ml-border); }
.ml-lp-price-old { color: var(--ml-text-muted); font-size: 15px; }
.ml-lp-price-now { font-size: 28px; font-weight: 900; color: var(--ml-text); }
.ml-lp-plans { color: var(--ml-text-muted); font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.ml-lp-plans:hover { color: var(--ml-accent-ink); }

/* FAQ */
.ml-lp-faq { display: grid; gap: 10px; }
.ml-lp-faq details { border-radius: 18px; background: var(--ml-surface); border: 1px solid var(--ml-border); padding: 0 18px; }
.ml-lp-faq details[open] { border-color: var(--lp-o-line); }
.ml-lp-faq summary { cursor: pointer; padding: 16px 0; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.ml-lp-faq summary::-webkit-details-marker { display: none; }
.ml-lp-faq summary::after { content: "+"; color: var(--lp-o); font-size: 22px; line-height: 1; font-weight: 900; }
.ml-lp-faq details[open] summary::after { content: "−"; }
.ml-lp-faq p { margin: 0 0 16px; color: var(--ml-text-2); line-height: 1.95; }

/* Final band */
.ml-lp-final {
	display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center;
	padding: 24px 26px; border-radius: 28px; color: var(--ml-on-accent);
	background: linear-gradient(120deg, var(--lp-o-dark), var(--lp-o) 55%, var(--lp-o2));
	box-shadow: 0 24px 50px -24px color-mix(in srgb, var(--ml-accent) 80%, transparent);
}
.ml-lp-final-hex {
	display: grid; place-items: center; width: 62px; height: 56px; font-size: 22px; color: var(--lp-o-dark);
	clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); background: var(--ml-highlight);
}
.ml-lp-final-text strong { font-size: 20px; font-weight: 900; }
.ml-lp-final-text p { margin: 4px 0 0; opacity: .92; }

/* Phone dock */
.ml-lp-dock { display: none; }

@media (max-width: 860px) {
	.ml-lp-hero { padding-top: 18px; }
	.ml-lp-hero-grid { grid-template-columns: 1fr; gap: 22px; }
	.ml-lp-visual { order: -1; }
		.ml-lp-outcomes { grid-template-columns: 1fr; }
	.ml-lp-price { grid-template-columns: 1fr; padding: 20px; }
	.ml-lp-final { grid-template-columns: 1fr; text-align: center; justify-items: center; }
	.ml-lp-road::before { inset-inline-start: 22px; transform: none; }
	.ml-lp-unit-title { justify-self: start; margin-inline-start: 8px; }
	.ml-lp-step { grid-template-columns: 76px 1fr; padding-inline-start: 0; }
	.ml-lp-hex { grid-column: 1; }
	.ml-lp-step:nth-child(odd) .ml-lp-step-name,
	.ml-lp-step:nth-child(even) .ml-lp-step-name { grid-column: 2; justify-content: flex-start; text-align: start; padding-inline-start: 4px; }
	.ml-lp-finish { justify-items: start; padding-inline-start: 4px; }
	.ml-lp { padding-bottom: 96px; }
	.ml-lp-dock {
		display: block; position: fixed; z-index: 50; inset-inline: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
		background: color-mix(in srgb, var(--ml-bg) 88%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--ml-border);
	}
	.ml-lp-dock .ml-lp-btn { width: 100%; }
}
@media (max-width: 480px) {
	.ml-lp-wrap { padding: 0 14px; }
	.ml-lp-cta .ml-lp-btn { flex: 1 1 100%; }
	.ml-lp-stats li { min-width: 0; flex: 1 1 calc(50% - 10px); }
	.ml-lp-road::before { inset-inline-start: 17px; }
	.ml-lp-step { grid-template-columns: 66px 1fr; }
	.ml-lp-hex { width: 54px; height: 49px; }
	.ml-lp-step.is-start .ml-lp-hex { width: 62px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) { .ml-lp-step.is-start .ml-lp-hex { animation: none; } }

/* ==========================================================================
   v4.5: landing title, 3D hexes, and the course map in the orange theme.
   ========================================================================== */

/* Landing title: a short bold line and a calmer tagline. */
.ml-lp-title { display: grid; gap: 8px; font-family: Yekanbakh, Vazirmatn, IRANSans, sans-serif; }
.ml-lp-title-main { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.35; font-weight: 800; letter-spacing: -.2px; color: var(--ml-text); }
.ml-lp-title-tag { font-size: clamp(17px, 1.7vw, 21px); line-height: 1.7; font-weight: 600; color: var(--ml-accent-ink); }

/* Landing road: extruded 3D hexes (side + glossy top face). */
.ml-lp-hex {
	clip-path: none; background: none; width: 64px; height: 64px;
	filter: drop-shadow(0 8px 10px color-mix(in srgb, var(--ml-shadow-warm) 22%, transparent));
}
.ml-lp-hex::before,
.ml-lp-hex::after {
	content: ""; position: absolute; inset-inline: 0; height: 56px;
	clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
}
.ml-lp-hex::before { top: 8px; background: var(--lp-o-dark); }
.ml-lp-hex::after {
	top: 0; background:
		linear-gradient(180deg, color-mix(in srgb, var(--ml-highlight) 45%, transparent), transparent 48%),
		linear-gradient(150deg, var(--lp-o3), var(--lp-o) 70%);
}
.ml-lp-hex b { position: absolute; inset: 0 0 8px; display: grid; place-items: center; z-index: 1; text-shadow: 0 1px 0 color-mix(in srgb, var(--ml-highlight) 45%, transparent); }
.ml-lp-step.is-locked .ml-lp-hex { background: none; filter: drop-shadow(0 6px 8px color-mix(in srgb, var(--ml-shadow-warm) 12%, transparent)); }
.ml-lp-step.is-locked .ml-lp-hex::before { background: color-mix(in srgb, var(--ml-accent) 22%, var(--ml-border-strong)); clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); inset: auto 0 auto 0; top: 8px; }
.ml-lp-step.is-locked .ml-lp-hex::after { background: linear-gradient(180deg, var(--ml-surface), color-mix(in srgb, var(--ml-accent) 6%, var(--ml-surface))); }
.ml-lp-step.is-locked .ml-lp-hex b { text-shadow: none; }
.ml-lp-step.is-start .ml-lp-hex { width: 64px; height: 64px; animation: ml-lp-glow 2.6s ease-in-out infinite; }
.ml-lp-step.is-start .ml-lp-hex::before { background: var(--ml-accent-deep); }
@keyframes ml-lp-glow {
	0%, 100% { filter: drop-shadow(0 8px 10px color-mix(in srgb, var(--ml-shadow-warm) 25%, transparent)); }
	50% { filter: drop-shadow(0 8px 10px color-mix(in srgb, var(--ml-shadow-warm) 25%, transparent)) drop-shadow(0 0 16px color-mix(in srgb, var(--ml-accent) 75%, transparent)); }
}
.ml-lp-finish span {
	clip-path: none; background: none; position: relative; width: 70px; height: 70px;
	filter: drop-shadow(0 8px 12px color-mix(in srgb, var(--ml-shadow-warm) 30%, transparent));
}
.ml-lp-finish span::before,
.ml-lp-finish span::after { content: ""; position: absolute; inset-inline: 0; height: 62px; clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); z-index: -1; }
.ml-lp-finish span::before { top: 8px; background: var(--ml-gold-shade); }
.ml-lp-finish span::after { top: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--ml-highlight) 50%, transparent), transparent 50%), linear-gradient(150deg, var(--ml-gold-1), var(--ml-gold-2)); }
@media (max-width: 480px) {
	.ml-lp-hex, .ml-lp-step.is-start .ml-lp-hex { width: 54px; height: 54px; }
	.ml-lp-hex::before, .ml-lp-hex::after { height: 47px; }
	.ml-lp-hex::before { top: 7px; }
}
@media (prefers-reduced-motion: reduce) { .ml-lp-step.is-start .ml-lp-hex { animation: none; } }

/* ---------- Course map in the orange theme ---------- */
.ml-course-view {
	--ml-course: var(--ml-accent);
	--mo: var(--ml-accent); --mo2: var(--ml-accent-2); --mo3: var(--ml-accent-3); --mo-d: var(--ml-accent-shade); --mo-dd: var(--ml-accent-deep);
	--mo-soft: color-mix(in srgb, var(--ml-accent) 10%, var(--ml-surface));
	--mo-line: color-mix(in srgb, var(--ml-accent) 24%, var(--ml-border));
}
.ml-course-view .ml-back-pill:hover { border-color: var(--mo); color: var(--ml-accent-ink); }

/* Hero: warm gradient, soft hex pattern, white 3D continue button. */
.ml-course-view .ml-stage-hero {
	padding: 26px 28px;
	background:
		radial-gradient(420px 220px at 0% 0%, color-mix(in srgb, var(--ml-accent-3) 35%, transparent), transparent 70%),
		linear-gradient(135deg, var(--ml-hero-1) 0%, var(--ml-hero-2) 45%, var(--ml-hero-3) 100%);
	box-shadow: 0 26px 50px -26px color-mix(in srgb, var(--ml-shadow-warm) 75%, transparent);
}
.ml-course-view .ml-stage-hero::after {
	content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .14;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 56 98'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 98' fill='none' stroke='%23fff' stroke-width='1.6'/%3E%3C/svg%3E");
	background-size: 42px 74px;
	-webkit-mask-image: linear-gradient(270deg, var(--ml-shade), transparent 70%); mask-image: linear-gradient(270deg, var(--ml-shade), transparent 70%);
}
.ml-course-view .ml-stage-hero > * { position: relative; z-index: 1; }
.ml-course-view .ml-stage-hero h1 { font-family: Yekanbakh, Vazirmatn, sans-serif; font-weight: 800; font-size: clamp(22px, 2.6vw, 30px); }
.ml-course-view .ml-stage-hero-bar { height: 12px; background: color-mix(in srgb, var(--ml-shade) 22%, transparent); }
.ml-course-view .ml-stage-hero-bar i { background: linear-gradient(90deg, var(--ml-gold-1), var(--ml-highlight)); box-shadow: 0 0 12px color-mix(in srgb, var(--ml-highlight) 80%, transparent); }
.ml-course-view .ml-stage-hero-actions .ml-btn-green {
	background: var(--ml-highlight); color: var(--mo-d); border-radius: 16px; min-height: 50px;
	box-shadow: 0 5px 0 color-mix(in srgb, var(--ml-shadow-warm) 35%, transparent), 0 16px 30px -14px color-mix(in srgb, var(--ml-shade) 50%, transparent);
}
.ml-course-view .ml-stage-hero-actions .ml-btn-green:hover { background: color-mix(in srgb, var(--ml-highlight) 90%, var(--ml-accent)); color: var(--mo-dd); filter: none; transform: translateY(-1px); }

/* Offer and buttons */
.ml-course-view .ml-btn-green {
	background: linear-gradient(180deg, var(--mo2), var(--mo)); color: var(--ml-on-accent); box-shadow: 0 4px 0 var(--mo-d);
}
.ml-course-view .ml-btn-green:hover { background: linear-gradient(180deg, var(--mo2), var(--mo)); color: var(--ml-on-accent); box-shadow: 0 4px 0 var(--mo-d), 0 12px 24px -12px color-mix(in srgb, var(--ml-accent) 80%, transparent); }

/* Unit sections */
.ml-course-view .ml-unit-sec {
	--unit: var(--ml-accent);
	border-radius: 26px; padding: 18px 18px 30px;
	background-color: var(--ml-surface);
	background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ml-accent) 13%, transparent) 1px, transparent 0);
	background-size: 22px 22px;
	box-shadow: 0 14px 32px -24px color-mix(in srgb, var(--ml-shadow-warm) 45%, transparent);
}
.ml-course-view .ml-unit-sec.is-current { border-color: var(--mo-line); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ml-accent) 12%, transparent), 0 18px 36px -24px color-mix(in srgb, var(--ml-shadow-warm) 55%, transparent); }
.ml-course-view .ml-unit-sec-head { border-bottom-color: var(--mo-line); }
.ml-course-view .ml-unit-sec-icon {
	width: 46px; height: 46px; flex-basis: 46px; border-radius: 0; font-size: 18px; font-weight: 900; color: var(--ml-on-accent);
	clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%);
	background: linear-gradient(150deg, var(--mo3), var(--mo) 60%, var(--mo-d));
}
.ml-course-view .ml-unit-sec-kicker { color: var(--ml-accent-ink); }
.ml-course-view .ml-unit-sec-title { font-family: Yekanbakh, Vazirmatn, sans-serif; font-weight: 800; font-size: 18px; }
.ml-course-view .ml-jr-score { background: var(--mo-soft); color: var(--ml-accent-ink); border: 1px solid var(--mo-line); }
.ml-course-view .ml-unit-sec.is-done .ml-jr-score { background: linear-gradient(150deg, var(--ml-gold-1), var(--ml-gold-2)); color: var(--ml-gold-ink); border-color: transparent; }
.ml-course-view .ml-jr-seg i { height: 8px; background: color-mix(in srgb, var(--ml-accent) 12%, var(--ml-border)); }
.ml-course-view .ml-jr-seg i.is-on { background: linear-gradient(90deg, var(--mo3), var(--mo)); }

/* Path links */
.ml-course-view .ml-jr-link path { stroke: color-mix(in srgb, var(--ml-accent) 16%, var(--ml-border-strong)); stroke-width: 12; }
.ml-course-view .ml-jr-link.is-done path { stroke: var(--mo2); }

/* 3D hex nodes: a darker side below, a glossy top face. */
.ml-course-view .ml-jr-button { width: 76px; height: 76px; }
.ml-course-view .ml-jr-button:not(.is-static) { filter: drop-shadow(0 9px 10px color-mix(in srgb, var(--ml-shadow-warm) 20%, transparent)); }
.ml-course-view .ml-jr-hex {
	width: 76px; height: 76px; filter: none;
	clip-path: polygon(50% 0%, 100% 23%, 100% 77%, 50% 100%, 0% 77%, 0% 23%);
}
.ml-course-view .ml-jr-face {
	inset: 0 0 9px 0;
	clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.ml-course-view .ml-jr-face::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(180deg, color-mix(in srgb, var(--ml-highlight) 50%, transparent), transparent 46%);
}
.ml-course-view .ml-jr-glyph { inset: 0 0 9px; font-size: 19px; }

.ml-course-view .ml-jr-node.is-done .ml-jr-hex { background: var(--mo-d); }
.ml-course-view .ml-jr-node.is-done .ml-jr-face { background: linear-gradient(150deg, var(--ml-accent-3), var(--mo) 70%); }
.ml-course-view .ml-jr-node.is-done .ml-jr-glyph { color: var(--ml-on-accent); text-shadow: 0 1px 0 color-mix(in srgb, var(--ml-highlight) 40%, transparent); }

.ml-course-view .ml-jr-node.is-current .ml-jr-button { width: 86px; height: 86px; }
.ml-course-view .ml-jr-node.is-current .ml-jr-hex { width: 86px; height: 86px; background: var(--mo-dd); filter: none; }
.ml-course-view .ml-jr-node.is-current .ml-jr-face { inset: 0 0 10px 0; background: linear-gradient(150deg, var(--ml-accent-3), var(--mo2) 40%, var(--ml-accent-strong)); }
.ml-course-view .ml-jr-node.is-current .ml-jr-glyph { inset: 0 0 10px; color: var(--ml-on-accent); font-size: 22px; text-shadow: 0 1px 0 color-mix(in srgb, var(--ml-highlight) 40%, transparent); }
.ml-course-view .ml-jr-node.is-current .ml-jr-button { animation: ml-map-glow 2.2s ease-in-out infinite; top: -6px; }
@keyframes ml-map-glow {
	0%, 100% { filter: drop-shadow(0 10px 12px color-mix(in srgb, var(--ml-shadow-warm) 30%, transparent)); }
	50% { filter: drop-shadow(0 10px 12px color-mix(in srgb, var(--ml-shadow-warm) 30%, transparent)) drop-shadow(0 0 18px color-mix(in srgb, var(--ml-accent) 80%, transparent)); }
}
.ml-course-view .ml-jr-flag { top: -40px; background: var(--mo); color: var(--ml-on-accent); border-color: var(--mo-d); box-shadow: 0 4px 0 var(--mo-d); }

.ml-course-view .ml-jr-node.is-open .ml-jr-hex { background: color-mix(in srgb, var(--ml-accent) 40%, var(--ml-border-strong)); }
.ml-course-view .ml-jr-node.is-open .ml-jr-face { background: linear-gradient(180deg, var(--ml-surface), color-mix(in srgb, var(--ml-accent) 8%, var(--ml-surface))); }
.ml-course-view .ml-jr-node.is-open .ml-jr-glyph { color: var(--ml-accent-ink); }

.ml-course-view .ml-jr-node.is-locked .ml-jr-hex { background: color-mix(in srgb, var(--ml-stone) 30%, var(--ml-border-strong)); filter: none; }
.ml-course-view .ml-jr-node.is-locked .ml-jr-face { background: linear-gradient(180deg, var(--ml-surface-2), color-mix(in srgb, var(--ml-stone) 8%, var(--ml-surface-2))); }
.ml-course-view .ml-jr-node.is-locked .ml-jr-face::after { opacity: .5; }

.ml-course-view .ml-jr-pop-cta { background: var(--mo); box-shadow: 0 3px 0 var(--mo-d); }
.ml-course-view .ml-jr-node.is-locked .ml-jr-pop-cta { background: var(--mo); box-shadow: 0 3px 0 var(--mo-d); }
@media (prefers-reduced-motion: reduce) { .ml-course-view .ml-jr-node.is-current .ml-jr-button { animation: none; } }
/* The «ادامه» flag sits beside the current hex, not on the one before it. */
.ml-course-view .ml-jr-flag {
	top: 22px; left: calc(var(--x, 80px) + 54px); transform: none;
	animation: ml-map-bob 1.6s ease-in-out infinite;
}
@keyframes ml-map-bob { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .ml-course-view .ml-jr-flag { animation: none; } }

/* Pricing and shared purchase choices. */
.ml-pricing { --lp-o: var(--ml-accent); }
.ml-pricing .ml-shell { max-width: 1120px; }
.ml-pricing-hero { text-align: center; padding: 64px 0 44px; }
.ml-pricing-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0 0 16px; }
.ml-pricing-hero p { color: var(--ml-text-muted); }
.ml-pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ml-pricing-card { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 30px; border: 1px solid var(--ml-border); border-radius: 22px; background: var(--ml-surface); }
.ml-pricing-card h2, .ml-pricing-card h3, .ml-pricing-card p { margin: 0; }
.ml-pricing-card strong { font-size: 1.4rem; }
.ml-pricing-card p { color: var(--ml-text-muted); }
.ml-pricing-card .ml-offer-button { margin-top: auto; }
.ml-pricing-card.is-featured { border: 2px solid var(--lp-o); }
.ml-pricing-badge { align-self: flex-start; color: var(--ml-accent-ink); background: var(--ml-accent-soft); padding: 5px 12px; border-radius: 99px; font-size: .8rem; }
.ml-pricing-comparison { text-align: center; margin: 28px 0; color: var(--ml-text-muted); }
.ml-pricing-section { padding: 42px 0; border-top: 1px solid var(--ml-border); }
.ml-pricing-section h2 { margin: 0 0 24px; }
.ml-pricing-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 30px; padding-inline-start: 24px; }
.ml-pricing-card ol { padding-inline-start: 24px; margin: 0; }
.ml-pricing-card li { margin-bottom: 10px; }
.ml-pricing-faq details { padding: 18px 0; border-bottom: 1px solid var(--ml-border); }
.ml-pricing-faq summary { cursor: pointer; font-weight: 700; }
.ml-pricing-faq p { color: var(--ml-text-muted); }
.ml-offer-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ml-offer-button { display: inline-flex; align-items: center; justify-content: center; text-align: center; padding: 13px 18px; border-radius: 12px; font-weight: 700; text-decoration: none; border: 1px solid var(--ml-accent); }
.ml-offer-button.is-primary { background: var(--ml-accent); color: var(--ml-on-accent); }
.ml-offer-button.is-ghost { background: transparent; color: var(--ml-accent-ink); }
.ml-offer-plans { display: inline-block; margin-top: 12px; }
.ml-pricing-banner { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 20px 0; padding: 16px 20px; border: 1px solid var(--ml-accent-line); border-radius: 16px; background: var(--ml-surface); }
.ml-pricing-banner a { color: var(--ml-accent-ink); white-space: nowrap; font-weight: 700; }
@media (max-width: 700px) { .ml-pricing-grid, .ml-pricing-list { grid-template-columns: 1fr; } .ml-offer-actions { flex-direction: column; } .ml-pricing-hero { padding: 42px 0 32px; } .ml-pricing-banner { align-items: flex-start; } }


/* ================================================================
   Buy box: two choices (pass / this course), one button.
   Used on the course landing (hero panel), the course map and, compact,
   at the paywall. Markup: ml_academy_render_chooser().
   ================================================================ */
.ml-chooser {
	--ch-accent: var(--ml-accent);
	--ch-accent-ink: var(--ml-accent-ink);
	--ch-surface: var(--ml-surface);
	--ch-line: var(--ml-border);
	--ch-ink: var(--ml-text);
	--ch-muted: var(--ml-text-muted);
	direction: rtl;
	color: var(--ch-ink);
}

.ml-chooser-title {
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 900;
	color: var(--ch-ink);
}

.ml-chooser-cards { display: grid; gap: 12px; }

.ml-choice { position: relative; display: block; margin: 0; cursor: pointer; }

.ml-choice > input { position: absolute; inset: 0; opacity: 0; pointer-events: none; }

.ml-choice-box {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 18px 18px 16px;
	border: 1.5px solid var(--ch-line);
	border-radius: 20px;
	background: var(--ch-surface);
	transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.ml-choice:hover .ml-choice-box { border-color: color-mix(in srgb, var(--ch-accent) 45%, var(--ch-line)); }

.ml-choice > input:checked + .ml-choice-box {
	border-color: var(--ch-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ch-accent) 18%, transparent), 0 18px 40px -26px var(--ch-accent);
}

.ml-choice--pass > input:checked + .ml-choice-box {
	background:
		radial-gradient(420px 160px at 100% 0%, color-mix(in srgb, var(--ch-accent) 12%, transparent), transparent 70%),
		var(--ch-surface);
}

.ml-choice > input:focus-visible + .ml-choice-box { outline: 3px solid var(--ch-accent-ink); outline-offset: 3px; }

.ml-choice-head { display: flex; align-items: center; gap: 10px; }

.ml-choice-head strong { flex: 1; font-size: 16px; font-weight: 900; line-height: 1.6; }

.ml-choice-radio {
	flex: none;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 2px solid var(--ch-line);
	background: var(--ch-surface);
	transition: border .18s ease;
}

.ml-choice > input:checked + .ml-choice-box .ml-choice-radio { border: 7px solid var(--ch-accent); }

.ml-choice-badge {
	flex: none;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--ch-accent);
	color: var(--ml-on-accent);
	font-size: 11.5px;
	font-weight: 800;
}

/* Duration switch inside the pass card. */
.ml-choice-terms {
	display: inline-grid;
	grid-auto-flow: column;
	grid-auto-columns: 1fr;
	align-self: flex-start;
	gap: 4px;
	padding: 4px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--ch-accent) 9%, var(--ch-surface));
}

.ml-term {
	min-width: 72px;
	padding: 6px 14px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--ch-muted);
	font: inherit;
	font-size: 13px;
	font-weight: 800;
	cursor: pointer;
}

.ml-term.is-on { background: var(--ch-surface); color: var(--ch-accent-ink); box-shadow: 0 4px 12px -6px color-mix(in srgb, var(--ml-shade) 30%, transparent); }

.ml-choice-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }

.ml-choice-price b { font-size: 24px; font-weight: 900; color: var(--ch-ink); font-variant-numeric: tabular-nums; }

.ml-choice-price small { color: var(--ch-muted); font-size: 12.5px; }

.ml-choice-hook {
	display: block;
	padding: 9px 12px;
	border-radius: 12px;
	background: color-mix(in srgb, var(--ch-accent) 11%, transparent);
	color: var(--ch-accent-ink);
	font-size: 13.5px;
	font-weight: 800;
	line-height: 1.8;
}

.ml-choice-credit {
	color: var(--ml-success-ink);
	font-size: 12.5px;
	font-weight: 700;
}

.ml-choice-ticks { display: grid; gap: 6px; margin-top: 2px; }

.ml-choice-ticks span {
	position: relative;
	padding-inline-start: 24px;
	color: var(--ch-ink);
	font-size: 13px;
	line-height: 1.8;
}

.ml-choice-ticks span::before {
	content: "✓";
	position: absolute;
	inset-inline-start: 0;
	top: 1px;
	width: 17px;
	height: 17px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, var(--ch-accent) 15%, transparent);
	color: var(--ch-accent-ink);
	font-size: 10px;
	font-weight: 900;
}

/* Unselected cards stay short: details only on the chosen one. */
.ml-chooser.is-js .ml-choice > input:not(:checked) + .ml-choice-box .ml-choice-ticks,
.ml-chooser.is-js .ml-choice > input:not(:checked) + .ml-choice-box .ml-choice-terms { display: none; }

.ml-choice-fallback { color: var(--ch-accent-ink); font-size: 13px; font-weight: 800; }

.ml-chooser.is-js .ml-choice-fallback { display: none; }

.ml-chooser-buy {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	margin-top: 14px;
	padding: 0 18px;
	border-radius: 16px;
	background: var(--ch-accent);
	color: var(--ml-on-accent) !important;
	font-size: 15.5px;
	font-weight: 900;
	text-decoration: none !important;
	box-shadow: 0 14px 28px -14px var(--ch-accent);
	transition: transform .15s ease, background .15s ease;
}

.ml-chooser-buy:hover { background: var(--ml-accent-hover); transform: translateY(-1px); }

.ml-chooser-trial {
	display: block;
	margin-top: 12px;
	text-align: center;
	color: var(--ch-accent-ink) !important;
	font-size: 13.5px;
	font-weight: 800;
	text-decoration: none !important;
}

.ml-chooser-trial:hover { text-decoration: underline !important; }

/* Compact (paywall): cards side by side, no extras. */
.ml-chooser.is-compact .ml-chooser-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ml-chooser.is-compact .ml-choice-box { padding: 14px; gap: 8px; }
.ml-chooser.is-compact .ml-choice-head strong { font-size: 14px; }
.ml-chooser.is-compact .ml-choice-price b { font-size: 18px; }
.ml-chooser.is-compact .ml-choice-hook { font-size: 12.5px; padding: 7px 10px; }

/* Landing hero: buy panel in the second column. */
.ml-lp-buy {
	align-self: start;
	padding: 14px 14px 18px;
	border: 1px solid var(--ml-border);
	border-radius: 26px;
	background: var(--ml-surface);
	box-shadow: 0 30px 60px -36px color-mix(in srgb, var(--ml-shadow-warm) 45%, transparent);
}

.ml-lp-buy-cover {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 7;
	object-fit: cover;
	margin-bottom: 16px;
	border-radius: 16px;
}

.ml-lp-buy .ml-chooser { padding: 0 4px; }

/* Phone sticky bar. */
.ml-chooser-sticky { display: none; }

@media (max-width: 719px) {
	.ml-chooser.is-compact .ml-chooser-cards { grid-template-columns: 1fr; }
	.ml-lp-buy { padding: 12px 12px 16px; border-radius: 22px; }
	.ml-lp-buy-cover { aspect-ratio: 16 / 6; margin-bottom: 12px; }
	.ml-choice-price b { font-size: 21px; }

	.ml-chooser-sticky:not([hidden]) {
		position: fixed;
		z-index: 1000;
		inset: auto 0 0;
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
		background: var(--ch-surface);
		border-top: 1px solid var(--ch-line);
		box-shadow: 0 -10px 30px -12px color-mix(in srgb, var(--ml-shade) 30%, transparent);
	}

	.ml-sticky-info {
		flex: 1;
		min-width: 0;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		padding: 0;
		border: 0;
		background: none;
		color: var(--ch-ink);
		font: inherit;
		text-align: start;
		cursor: pointer;
	}

	.ml-sticky-name { font-size: 12.5px; font-weight: 800; }
	.ml-sticky-name::after { content: " · تغییر"; color: var(--ch-accent-ink); font-weight: 700; }
	.ml-sticky-price { font-size: 16px; font-weight: 900; }

	.ml-sticky-buy {
		flex: none;
		padding: 13px 26px;
		border-radius: 14px;
		background: var(--ch-accent);
		color: var(--ml-on-accent) !important;
		font-weight: 900;
		text-decoration: none !important;
	}

	.ml-lp-stats { flex-wrap: nowrap; gap: 6px; }
	.ml-lp-stats li { min-width: 0; flex: 1 1 0; padding: 8px 6px; text-align: center; }
	.ml-lp-stats strong { font-size: 16px; }
	.ml-lp-stats span { font-size: 11px; }
}


/* Academy header: signed-in name + photo or initial. */
.ml-chrome-user { gap: 8px; }
.ml-chrome-user .ms-account__photo,
.ml-chrome-user__initial {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	object-fit: cover;
}
.ml-chrome-user__initial {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--ml-accent);
	color: var(--ml-on-accent);
	font-size: 12px;
	font-weight: 800;
}

/* ================================================================
   Subscription page (/academy/plans/, templates/plans.php).
   ================================================================ */
.mlx {
	--x-accent: var(--ml-accent);
	--x-accent-ink: var(--ml-accent-ink);
	--x-surface: var(--ml-surface);
	--x-line: var(--ml-border);
	--x-ink: var(--ml-text);
	--x-muted: var(--ml-text-muted);
	--x-soft: color-mix(in srgb, var(--x-accent) 8%, var(--x-surface));
	padding-bottom: 80px;
	color: var(--x-ink);
}

.mlx-wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

.mlx h1, .mlx h2 { color: var(--x-ink); font-weight: 900; }

/* Hero */
.mlx-hero {
	position: relative;
	padding: 56px 0 120px;
	text-align: center;
	background:
		radial-gradient(700px 320px at 50% 0%, color-mix(in srgb, var(--x-accent) 22%, transparent), transparent 70%),
		linear-gradient(180deg, color-mix(in srgb, var(--x-accent) 7%, transparent), transparent);
}

.mlx-pill {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--x-surface);
	border: 1px solid color-mix(in srgb, var(--x-accent) 35%, var(--x-line));
	color: var(--x-accent-ink);
	font-size: 13px;
	font-weight: 800;
}

.mlx-hero h1 { margin: 16px auto 0; max-width: 760px; font-size: clamp(28px, 4.2vw, 46px); line-height: 1.45; }

.mlx-lead { margin: 14px auto 0; max-width: 620px; color: var(--x-muted); font-size: 16px; line-height: 2; }

.mlx-proof {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 22px 0 0;
	padding: 0;
	list-style: none;
}

.mlx-proof li {
	padding: 7px 14px;
	border-radius: 999px;
	background: var(--x-surface);
	border: 1px solid var(--x-line);
	font-size: 13px;
	color: var(--x-muted);
}

.mlx-proof b { color: var(--x-ink); }

.mlx-active {
	display: inline-block;
	margin: 18px 0 0;
	padding: 8px 16px;
	border-radius: 12px;
	background: var(--ml-success-bg);
	color: var(--ml-success-fg);
	font-weight: 800;
	font-size: 14px;
}

/* Plan cards */
.mlx-plans {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px;
	max-width: 860px;
	margin-top: -84px;
	align-items: stretch;
}

.mlx-plan {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 30px 28px 28px;
	border: 1px solid var(--x-line);
	border-radius: 28px;
	background: var(--x-surface);
	box-shadow: 0 30px 60px -40px color-mix(in srgb, var(--ml-shadow-warm) 45%, transparent);
}

.mlx-plan.is-featured {
	border: 2px solid var(--x-accent);
	background:
		radial-gradient(500px 220px at 100% 0%, color-mix(in srgb, var(--x-accent) 14%, transparent), transparent 70%),
		var(--x-surface);
	box-shadow: 0 34px 70px -36px color-mix(in srgb, var(--x-accent) 75%, transparent);
}

.mlx-plan__badge {
	position: absolute;
	top: -15px;
	inset-inline-start: 24px;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--x-accent);
	color: var(--ml-on-accent);
	font-size: 12.5px;
	font-weight: 800;
	box-shadow: 0 10px 20px -10px var(--x-accent);
}

.mlx-plan__title { margin: 0; font-size: 21px; }

.mlx-plan__sub { margin: 4px 0 0; color: var(--x-muted); font-size: 13.5px; }

.mlx-plan__price { margin: 22px 0 0; }

.mlx-plan__price b { display: block; font-size: clamp(28px, 3.4vw, 36px); font-weight: 900; color: var(--x-ink); font-variant-numeric: tabular-nums; }

.mlx-plan__price span { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 8px; background: var(--x-soft); color: var(--x-accent-ink); font-size: 13px; font-weight: 800; }

.mlx-plan__credit { margin: 12px 0 0; color: var(--ml-success-ink); font-size: 13px; font-weight: 700; }

.mlx-plan__buy {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	margin-top: 22px;
	padding: 0 22px;
	border-radius: 16px;
	border: 1.5px solid var(--x-accent);
	background: transparent;
	color: var(--x-accent-ink) !important;
	font-size: 15.5px;
	font-weight: 900;
	text-decoration: none !important;
	transition: background .15s ease, color .15s ease, transform .15s ease;
}

.mlx-plan__buy:hover { background: var(--x-soft); transform: translateY(-1px); }

.mlx-plan.is-featured .mlx-plan__buy,
.mlx-final .mlx-plan__buy {
	background: var(--x-accent);
	color: var(--ml-on-accent) !important;
	box-shadow: 0 14px 28px -14px var(--x-accent);
}

.mlx-plan.is-featured .mlx-plan__buy:hover,
.mlx-final .mlx-plan__buy:hover { background: var(--ml-accent-hover); }

.mlx-ticks { display: grid; gap: 10px; margin: 22px 0 0; padding: 20px 0 0; border-top: 1px dashed var(--x-line); list-style: none; }

.mlx-ticks li { position: relative; padding-inline-start: 28px; font-size: 14px; line-height: 1.8; }

.mlx-ticks li::before {
	content: "✓";
	position: absolute;
	inset-inline-start: 0;
	top: 2px;
	width: 19px;
	height: 19px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, var(--x-accent) 15%, transparent);
	color: var(--x-accent-ink);
	font-size: 11px;
	font-weight: 900;
}

.mlx-single { margin-top: 22px; text-align: center; color: var(--x-muted); font-size: 14px; }

.mlx-single a { color: var(--x-accent-ink); font-weight: 800; text-decoration: none; }

/* Value bars */
.mlx-value {
	max-width: 860px;
	margin-top: 56px;
	padding: 28px;
	border: 1px solid var(--x-line);
	border-radius: 24px;
	background: var(--x-surface);
}

.mlx-value h2 { margin: 0 0 18px; font-size: 20px; }

.mlx-bars { display: grid; gap: 14px; }

.mlx-bar { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; align-items: center; gap: 14px; }

.mlx-bar__label { font-size: 13.5px; color: var(--x-muted); }

.mlx-bar__track { height: 14px; border-radius: 999px; background: var(--ml-surface-2); overflow: hidden; }

.mlx-bar__track i { display: block; height: 100%; border-radius: inherit; background: color-mix(in srgb, var(--x-muted) 55%, transparent); }

.mlx-bar.is-pass .mlx-bar__track i { background: linear-gradient(90deg, var(--ml-accent-2), var(--x-accent)); }

.mlx-bar b { font-size: 15px; white-space: nowrap; }

.mlx-bar.is-pass b, .mlx-bar.is-pass .mlx-bar__label { color: var(--x-accent-ink); font-weight: 900; }

/* Sections */
.mlx-sec { margin-top: 64px; }

.mlx-sec > h2 { margin: 0; font-size: clamp(20px, 2.4vw, 26px); text-align: center; }

.mlx-sec__sub { margin: 8px 0 0; text-align: center; color: var(--x-muted); font-size: 14px; }

.mlx-courses {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 14px;
	margin-top: 24px;
}

.mlx-course {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--x-line);
	border-radius: 18px;
	background: var(--x-surface);
	color: var(--x-ink) !important;
	text-decoration: none !important;
	transition: transform .18s ease, border-color .18s ease;
}

.mlx-course:hover { transform: translateY(-3px); border-color: var(--x-accent); }

.mlx-course img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

.mlx-course__name { padding: 12px 14px 0; font-size: 14px; font-weight: 800; line-height: 1.7; }

.mlx-course__meta { padding: 2px 14px 14px; color: var(--x-muted); font-size: 12.5px; }

.mlx-steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
	counter-reset: mlx;
}

.mlx-steps li {
	position: relative;
	padding: 24px 22px 22px;
	border: 1px solid var(--x-line);
	border-radius: 20px;
	background: var(--x-surface);
	counter-increment: mlx;
}

.mlx-steps li::before {
	content: counter(mlx, persian);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin-bottom: 12px;
	border-radius: 12px;
	background: var(--x-accent);
	color: var(--ml-on-accent);
	font-weight: 900;
}

.mlx-steps b { display: block; font-size: 15.5px; }

.mlx-steps span { display: block; margin-top: 6px; color: var(--x-muted); font-size: 13.5px; line-height: 1.9; }

.mlx-paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 24px; }

.mlx-path { padding: 20px; border: 1px solid var(--x-line); border-radius: 20px; background: var(--x-surface); }

.mlx-path b { font-size: 15.5px; }

.mlx-path ol { margin: 12px 0 0; padding-inline-start: 20px; display: grid; gap: 6px; }

.mlx-path li { font-size: 13.5px; color: var(--x-muted); }

.mlx-path li::marker { color: var(--x-accent); font-weight: 800; }

.mlx-path a { color: var(--x-ink); text-decoration: none; }

.mlx-path a:hover { color: var(--x-accent-ink); }

.mlx-faq { max-width: 820px; }

.mlx-faq details { margin-top: 10px; padding: 0 20px; border: 1px solid var(--x-line); border-radius: 16px; background: var(--x-surface); }

.mlx-faq details:first-of-type { margin-top: 24px; }

.mlx-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 0; font-size: 15px; font-weight: 800; cursor: pointer; list-style: none; }

.mlx-faq summary::-webkit-details-marker { display: none; }

.mlx-faq summary::after { content: "+"; flex: none; color: var(--x-accent); font-size: 22px; line-height: 1; transition: transform .2s ease; }

.mlx-faq details[open] summary::after { transform: rotate(45deg); }

.mlx-faq details p { margin: 0 0 16px; color: var(--x-muted); font-size: 14px; line-height: 2; }

.mlx-faq details a { color: var(--x-accent-ink); }

.mlx-final {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	max-width: 860px;
	margin-top: 56px;
	padding: 28px 30px;
	border-radius: 24px;
	background:
		radial-gradient(500px 200px at 0% 100%, color-mix(in srgb, var(--x-accent) 20%, transparent), transparent 70%),
		var(--x-soft);
	border: 1px solid color-mix(in srgb, var(--x-accent) 30%, var(--x-line));
}

.mlx-final h2 { margin: 0; font-size: 21px; }

.mlx-final p { margin: 6px 0 0; color: var(--x-muted); font-size: 14px; }

.mlx-final .mlx-plan__buy { margin: 0; flex: none; }

@media (max-width: 760px) {
	.mlx-hero { padding: 36px 0 96px; }
	.mlx-plans { grid-template-columns: 1fr; gap: 26px; margin-top: -70px; }
	.mlx-plan.is-featured { order: -1; }
	.mlx-plan { padding: 26px 20px 22px; }
	.mlx-bar { grid-template-columns: 1fr auto; }
	.mlx-bar__track { grid-column: 1 / -1; grid-row: 2; }
	.mlx-value { padding: 22px 18px; }
	.mlx-steps { grid-template-columns: 1fr; }
	.mlx-courses { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.mlx-course__name { font-size: 13px; padding: 10px 10px 0; }
	.mlx-course__meta { padding: 2px 10px 10px; }
	.mlx-final { flex-direction: column; align-items: stretch; text-align: center; padding: 24px 20px; }
}


/* Academy header wordmark: first half follows the academy ink in both modes. */
.ml-chrome-brand .ms-logo__word-a { color: var(--ml-text); }

/* ================================================================
   Academy catalog: one-line title, sign-in hint, two ways to buy.
   ================================================================ */
@media (min-width: 900px) {
	.ml-home-hero h1 { white-space: nowrap; font-size: clamp(27px, 2.9vw, 38px); }
}

.ml-signin-hint {
	display: block;
	margin: 4px 0 18px;
	padding: 12px 16px;
	border: 1px dashed color-mix(in srgb, var(--ml-accent) 40%, var(--ml-border));
	border-radius: 14px;
	background: color-mix(in srgb, var(--ml-accent) 6%, var(--ml-surface));
	color: var(--ml-text-muted) !important;
	font-size: 14px;
	text-decoration: none !important;
}

.ml-signin-hint b { color: var(--ml-accent-ink); }

.ml-buyways {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: 16px;
	margin: 6px 0 26px;
}

.ml-buyway {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 24px 24px 22px;
	border: 1px solid var(--ml-border);
	border-radius: 24px;
	background: var(--ml-surface);
	color: var(--ml-text) !important;
	text-decoration: none !important;
}

.ml-buyway.is-pass {
	border: 2px solid var(--ml-accent);
	background:
		radial-gradient(420px 180px at 100% 0%, color-mix(in srgb, var(--ml-accent) 16%, transparent), transparent 70%),
		var(--ml-surface);
	box-shadow: 0 26px 50px -34px color-mix(in srgb, var(--ml-accent) 80%, transparent);
	transition: transform .18s ease;
}

.ml-buyway.is-pass:hover { transform: translateY(-3px); }

.ml-buyway-badge {
	position: absolute;
	top: -13px;
	inset-inline-start: 22px;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--ml-accent);
	color: var(--ml-on-accent);
	font-size: 12px;
	font-weight: 800;
}

.ml-buyway-icon {
	width: 42px;
	height: 42px;
	margin-bottom: 6px;
	border-radius: 13px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, var(--ml-accent) 12%, transparent);
	color: var(--ml-accent-ink);
	font-size: 18px;
}

.ml-buyway.is-single .ml-buyway-icon { background: var(--ml-surface-2); color: var(--ml-text-muted); }

.ml-buyway strong { font-size: 18px; font-weight: 900; }

.ml-buyway-text { color: var(--ml-text-muted); font-size: 13.5px; line-height: 1.9; }

.ml-buyway-price { margin-top: 4px; font-size: 16px; font-weight: 900; }

.ml-buyway.is-pass .ml-buyway-price { color: var(--ml-accent-ink); }

.ml-buyway-cta { margin-top: auto; padding-top: 10px; color: var(--ml-accent-ink); font-size: 14px; font-weight: 800; }

.ml-buyway-cta.is-muted { color: var(--ml-text-muted); font-weight: 700; }

@media (max-width: 720px) {
	.ml-buyways { grid-template-columns: 1fr; gap: 20px; }
	.ml-buyway { padding: 22px 18px 18px; }
}


/* Course landing, paid and not owned: big cover + text on one side, buy card on the other. */
.ml-lp-hero-grid.is-buy {
	grid-template-columns: minmax(0, 1.35fr) minmax(340px, .9fr);
	align-items: start;
	gap: 36px;
}

.ml-lp-hero-cover {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	margin-bottom: 22px;
	border-radius: 24px;
	box-shadow: 0 30px 60px -38px color-mix(in srgb, var(--ml-shadow-warm) 55%, transparent);
}

.ml-lp-hero-grid.is-buy .ml-lp-buy { position: sticky; top: 90px; padding: 20px 18px; }

@media (max-width: 900px) {
	.ml-lp-hero-grid.is-buy { grid-template-columns: 1fr; gap: 22px; }
	.ml-lp-hero-grid.is-buy .ml-lp-buy { position: static; }
	.ml-lp-hero-cover { border-radius: 18px; margin-bottom: 16px; }
}

/* Course map: slim unlock bar + dialog with the two choices. */
.ml-unlock-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin: 14px 0 18px;
	padding: 12px 14px 12px 12px;
	border: 1px solid color-mix(in srgb, var(--ml-accent) 35%, var(--ml-border));
	border-radius: 18px;
	background: color-mix(in srgb, var(--ml-accent) 7%, var(--ml-surface));
}

.ml-unlock-bar__text { color: var(--ml-text); font-size: 14px; line-height: 1.9; }

.ml-unlock-bar__btn {
	flex: none;
	min-height: 44px;
	padding: 0 18px;
	border: 0;
	border-radius: 13px;
	background: var(--ml-accent);
	color: var(--ml-on-accent);
	font: inherit;
	font-size: 14px;
	font-weight: 900;
	cursor: pointer;
	box-shadow: 0 12px 24px -14px var(--ml-accent);
}

.ml-unlock-bar__btn:hover { background: var(--ml-accent-hover); }

.ml-unlock-dialog {
	width: min(460px, calc(100vw - 24px));
	max-height: calc(100dvh - 32px);
	padding: 22px 18px 18px;
	border: 0;
	border-radius: 24px;
	background: var(--ml-surface);
	color: var(--ml-text);
	box-shadow: 0 40px 90px -30px color-mix(in srgb, var(--ml-shade) 55%, transparent);
}

.ml-unlock-dialog::backdrop { background: color-mix(in srgb, var(--ml-scrim) 55%, transparent); backdrop-filter: blur(3px); }

.ml-unlock-dialog__close {
	position: absolute;
	top: 10px;
	inset-inline-end: 12px;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: var(--ml-surface-2);
	color: var(--ml-text-muted);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.ml-unlock-dialog .ml-chooser-sticky { display: none !important; }

@media (max-width: 600px) {
	.ml-unlock-bar { flex-direction: column; align-items: stretch; text-align: center; }
}
.ml-unlock-dialog:not([open]) { display: none !important; }
.ml-unlock-dialog[open] { position: fixed; inset: 0; margin: auto; height: fit-content; overflow: auto; }

/* Lab exercises */
.ml-lab-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ml-lab-tabs button { border: 0; border-radius: 12px; padding: 9px 15px; background: var(--ml-surface-2); color: var(--ml-text-2); font: inherit; font-weight: 800; cursor: pointer; }
.ml-lab-tabs button.is-on { background: var(--ml-accent-soft); color: var(--ml-accent-ink); }
#ml-lab-count { margin-inline-start: auto; color: var(--ml-text-2); font-size: 13px; }
#ml-lab-list { max-height: 75vh; overflow-y: auto; align-content: start; gap: 4px; }
#ml-lab-list h3 { margin: 12px 4px 5px; font-size: 13px; color: var(--ml-text-2); }
.ml-lab-item { display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: center; gap: 9px; width: 100%; border: 0; border-radius: 10px; padding: 9px; background: transparent; color: var(--ml-text); text-align: start; font: inherit; font-size: 13px; cursor: pointer; }
.ml-lab-item:hover, .ml-lab-item.is-on { background: var(--ml-surface-2); }
.ml-lab-item > span:last-child { color: var(--ml-accent-ink); font-weight: bold; }
.ml-lab-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ml-level-easy); }
.ml-lab-dot.level-medium { background: var(--ml-level-medium); }
.ml-lab-dot.level-hard { background: var(--ml-level-hard); }
.ml-lab-prompt { line-height: 2; overflow-wrap: anywhere; }
.ml-lab-prompt h2 { font-size: 17px; }
.ml-pg [hidden] { display: none !important; }
#ml-lab-selftest { direction: ltr; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 900px) {
 .ml-pg-side { order: 1; }
 .ml-pg-work { order: 2; }
 #ml-lab-list { max-height: 240px; }
}

/* Academy catalog: the «continue» card and today's game stats as one board. */
.ml-gameboard {
	margin: 0 0 26px;
	border: 1.5px solid var(--ml-border);
	border-radius: 22px;
	background: var(--ml-surface);
	box-shadow: var(--ml-shadow);
	overflow: hidden;
}

.ml-gameboard .ml-continue-card {
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.ml-gameboard .ml-continue-card:hover { transform: none; background: color-mix(in srgb, var(--track) 5%, var(--ml-surface)); }

.ml-gameboard .ml-statsbar {
	margin: 0;
	padding: 10px 18px;
	border-top: 1px dashed var(--ml-border);
	background: var(--ml-bg);
}

.ml-gameboard .ml-statsbar-item { box-shadow: none; padding: 5px 12px; }


/* Regular hexagon (height = width × 1.155) for the «continue» card. */
.ml-continue-hex { width: 54px; height: 62px; flex: 0 0 54px; }
@media (max-width: 720px) { .ml-continue-hex { width: 46px; height: 53px; flex-basis: 46px; } }

/* Course map popover button: a fixed bright orange in both modes. */
.ml-jr-pop-cta { background: var(--ml-accent); color: var(--ml-on-accent) !important; box-shadow: 0 3px 0 var(--ml-accent-shade); }

/* Course card button: the course colour, deepened so white text always reads. */
.ml-course-cta { background: color-mix(in srgb, var(--track) 70%, var(--ml-track-shade)); color: var(--ml-on-track); }

/* Lab uses the site header, which floats a little below its own slot; leave room. */
.ml-app.ml-pg { padding-top: 72px; }
@media (max-width: 720px) { .ml-app.ml-pg { padding-top: 84px; } }

/* Free part of a paid course: a green box above the prices, so the price never comes first. */
.ml-chooser-free {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 16px;
	padding: 14px 14px 14px 12px;
	border: 1.5px solid var(--ml-success-border);
	border-radius: 18px;
	background: linear-gradient(135deg, var(--ml-success-bg), color-mix(in srgb, var(--ml-success) 14%, var(--ml-success-bg)));
	color: var(--ml-success-fg) !important;
	text-decoration: none !important;
	box-shadow: 0 14px 30px -22px color-mix(in srgb, var(--ml-success) 70%, transparent);
	transition: transform .15s ease, box-shadow .15s ease;
}
.ml-chooser-free:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -20px color-mix(in srgb, var(--ml-success) 80%, transparent); }
.ml-chooser-free__icon {
	flex: none;
	width: 42px;
	height: 42px;
	border-radius: 13px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--ml-surface);
	font-size: 20px;
	box-shadow: 0 4px 10px -6px color-mix(in srgb, var(--ml-success-shade) 50%, transparent);
}
.ml-chooser-free__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ml-chooser-free__text b { font-size: 15px; font-weight: 900; color: var(--ml-success-fg); }
.ml-chooser-free__text small { font-size: 12px; color: var(--ml-success-fg); line-height: 1.8; }
.ml-chooser-free__cta {
	flex: none;
	padding: 9px 14px;
	border-radius: 12px;
	background: var(--ml-success);
	color: var(--ml-on-success);
	font-size: 13.5px;
	font-weight: 900;
	white-space: nowrap;
	box-shadow: 0 6px 14px -8px var(--ml-success);
}
@media (max-width: 420px) {
	.ml-chooser-free { flex-wrap: wrap; }
	.ml-chooser-free__cta { width: 100%; text-align: center; }
}


/* ---------- Report a problem (assets/report.js, includes/reports.php) ---------- */
.ml-player-report { font-size: 13px; }
.ml-player-report[aria-expanded="true"] { background: var(--ml-accent-soft); border-color: var(--ml-accent); }
.ml-report {
	position: fixed;
	inset-inline-start: 16px;
	bottom: 16px;
	z-index: 10000;
	width: min(360px, calc(100vw - 32px));
	padding: 16px;
	border: 1px solid var(--ml-border-strong);
	border-radius: 18px;
	background: var(--ml-surface-raised);
	color: var(--ml-text);
	box-shadow: var(--ml-shadow-lg);
	direction: rtl;
	animation: ml-report-in .18s ease-out;
}
.ml-report[hidden] { display: none; }
@keyframes ml-report-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.ml-report__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.ml-report__head strong { font-size: 15px; font-weight: 900; }
.ml-report__close {
	width: 30px; height: 30px; border: 0; border-radius: 9px;
	background: transparent; color: var(--ml-text-muted); cursor: pointer; font-size: 14px;
}
.ml-report__close:hover { background: var(--ml-surface-hover); color: var(--ml-text); }
.ml-report__form { display: grid; gap: 10px; }
.ml-report__form[hidden] { display: none; }
.ml-report__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ml-report__chip {
	padding: 6px 11px; border: 1px solid var(--ml-border-strong); border-radius: 999px;
	background: var(--ml-surface-2); color: var(--ml-text-2, var(--ml-text)); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.ml-report__chip:hover { border-color: var(--ml-accent); }
.ml-report__chip[aria-checked="true"] { background: var(--ml-accent-soft); border-color: var(--ml-accent); color: var(--ml-accent-ink); }
.ml-report__quote {
	display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px;
	border-inline-start: 3px solid var(--ml-accent); border-radius: 10px; background: var(--ml-surface-2);
	font-size: 12.5px; line-height: 1.9; color: var(--ml-text-muted);
}
.ml-report__quote[hidden] { display: none; }
.ml-report__quote-text { flex: 1; max-height: 4.8em; overflow: auto; }
.ml-report__quote-drop { border: 0; background: none; color: var(--ml-text-faint); cursor: pointer; }
.ml-report__text {
	width: 100%; min-height: 84px; padding: 10px 12px; resize: vertical;
	border: 1px solid var(--ml-border-strong); border-radius: 12px;
	background: var(--ml-surface-sunken); color: var(--ml-text); font: inherit; font-size: 14px; line-height: 1.9;
}
.ml-report__text:focus { outline: none; border-color: var(--ml-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ml-accent) 18%, transparent); }
.ml-report__hint { margin: 0; font-size: 11.5px; color: var(--ml-text-faint); line-height: 1.8; }
.ml-report__error { margin: 0; font-size: 12.5px; font-weight: 700; color: var(--ml-heart, #e5484d); }
.ml-report__error[hidden] { display: none; }
.ml-report__send { width: 100%; justify-content: center; }
.ml-report__send:disabled { opacity: .7; cursor: wait; }
.ml-report__done { display: grid; justify-items: center; gap: 6px; padding: 14px 0 6px; text-align: center; }
.ml-report__done[hidden] { display: none; }
.ml-report__done p { margin: 0; font-weight: 800; }
.ml-report__done-icon {
	width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
	background: var(--ml-accent-soft); color: var(--ml-accent-ink); font-size: 20px; font-weight: 900;
}
@media (max-width: 560px) {
	.ml-report { inset-inline: 12px; bottom: 12px; width: auto; }
}
html body .ml-report textarea.ml-report__text {
	border: 1px solid var(--ml-border-strong) !important;
	background: var(--ml-surface-sunken) !important;
	color: var(--ml-text) !important;
	box-shadow: none !important;
}
html body .ml-report textarea.ml-report__text:focus {
	border-color: var(--ml-accent) !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--ml-accent) 18%, transparent) !important;
}

/* ---------- Answer feedback motion (light: transform/opacity only) ---------- */
.ml-confetti.is-burst i {
	top: var(--oy);
	left: var(--ox);
	width: 7px;
	height: 7px;
	border-radius: 50%;
	animation: ml-spark .72s cubic-bezier(.15, .7, .3, 1) forwards;
}
.ml-confetti.is-burst i:nth-child(3n) { width: 5px; height: 11px; border-radius: 3px; }
@keyframes ml-spark {
	0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); }
	15% { opacity: 1; }
	100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(160deg); }
}

/* Right answer: a quick pop and a check badge. Wrong: a short nudge and a cross. */
.ml-option.is-correct { animation: ml-pop .42s cubic-bezier(.3, 1.5, .5, 1); }
.ml-option.is-wrong { animation: ml-nudge .38s ease; }
.ml-option.is-correct::after,
.ml-option.is-wrong::after {
	position: absolute;
	inset-inline-end: 14px;
	top: 50%;
	width: 26px;
	height: 26px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	color: #fff;
	font-size: 14px;
	font-weight: 900;
	line-height: 1;
	transform: translateY(-50%);
	animation: ml-badge .34s cubic-bezier(.3, 1.6, .5, 1) .08s both;
}
.ml-option.is-correct::after { content: "✓"; background: var(--ml-success); }
.ml-option.is-wrong::after { content: "✕"; background: var(--ml-danger); }
.ml-option.is-correct,
.ml-option.is-wrong { padding-inline-end: 52px; }
@keyframes ml-pop { 0% { transform: scale(1); } 45% { transform: scale(1.025); } 100% { transform: scale(1); } }
@keyframes ml-nudge { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } }
@keyframes ml-badge { from { opacity: 0; transform: translateY(-50%) scale(.3); } to { opacity: 1; transform: translateY(-50%) scale(1); } }

/* The verdict bar slides up from the footer. */
.ml-feedback.ok,
.ml-feedback.bad { animation: ml-verdict .3s cubic-bezier(.2, .9, .3, 1.15); }
.ml-feedback.ok strong { animation: ml-pop .45s cubic-bezier(.3, 1.5, .5, 1) .1s; }
@keyframes ml-verdict { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	.ml-option.is-correct, .ml-option.is-wrong,
	.ml-option.is-correct::after, .ml-option.is-wrong::after,
	.ml-feedback.ok, .ml-feedback.bad, .ml-feedback.ok strong { animation: none; }
}

/* ---------- Code exercise verdicts ---------- */
/* Replayed on every check (assets/academy.js: replay/react), not only the first. */
.ml-feedback.is-fresh { animation: ml-verdict .32s cubic-bezier(.2, .9, .3, 1.15); }
.ml-feedback.bad.is-fresh { animation: ml-verdict .32s cubic-bezier(.2, .9, .3, 1.15), ml-nudge .38s ease .12s; }
.ml-editor-wrap.ml-react-bad { animation: ml-nudge .4s ease, ml-ring-bad .9s ease-out; }
.ml-editor-wrap.ml-react-good { animation: ml-ring-good 1s ease-out; }
.ml-react-pop { animation: ml-pop .45s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes ml-ring-bad {
	0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ml-danger) 55%, transparent); }
	100% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--ml-danger) 0%, transparent); }
}
@keyframes ml-ring-good {
	0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ml-success) 60%, transparent); }
	100% { box-shadow: 0 0 0 18px color-mix(in srgb, var(--ml-success) 0%, transparent); }
}

/* Check rows drop in one after another. */
.ml-check { animation: ml-check-in .3s cubic-bezier(.2, .9, .3, 1.2) both; }
.ml-check:nth-child(2) { animation-delay: .06s; }
.ml-check:nth-child(3) { animation-delay: .12s; }
.ml-check:nth-child(4) { animation-delay: .18s; }
.ml-check:nth-child(n+5) { animation-delay: .24s; }
.ml-check.is-ok .ml-check-ic { animation: ml-badge-pop .4s cubic-bezier(.3, 1.6, .5, 1) .15s both; }
@keyframes ml-check-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@keyframes ml-badge-pop { from { opacity: 0; transform: scale(.3); } }

@media (prefers-reduced-motion: reduce) {
	.ml-feedback.is-fresh, .ml-feedback.bad.is-fresh, .ml-editor-wrap.ml-react-bad,
	.ml-editor-wrap.ml-react-good, .ml-react-pop, .ml-check, .ml-check.is-ok .ml-check-ic { animation: none; }
}
.ml-feedback-detail { display: block; margin-top: 6px; font-size: 11.5px; opacity: .75; text-align: left; word-break: break-word; font-family: ui-monospace, monospace; }
/* Shared avatar (ml_user_avatar() in the theme): size in the academy header. */
.ml-chrome-user { --ml-av: 30px; }
@media (max-width: 620px) { .ml-chrome-user { --ml-av: 34px; } }
.ml-chrome-user .ml-avatar { display: inline-grid !important; }

.ml-sql-result, .ml-sql-error { direction: ltr; text-align: left; overflow-x: auto; margin: .75rem 0; padding: .6rem; border: 1px solid var(--ml-border); border-radius: .5rem; background: var(--ml-surface-2); color: var(--ml-text); }
.ml-sql-result table { width: auto; border-collapse: collapse; font-size: .85rem; }
.ml-sql-result th, .ml-sql-result td { padding: .3rem .55rem; border: 1px solid var(--ml-border-strong); white-space: nowrap; color: var(--ml-text); opacity: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ml-sql-result th { background: var(--ml-surface-3, var(--ml-surface)); font-weight: 700; }
.ml-sql-error { color: var(--ml-danger, var(--ml-text)); white-space: pre-wrap; }
