:root {
	--teal: #0f766e;
	--teal-dark: #115e59;
	--purple: #6d28d9;
	--ink: #0f172a;
	--muted: #475569;
	--line: #e2e8f0;
	--paper: #f8fafc;
	--white: #fff;
	--shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
	--radius: 16px;
	--max: 1080px;
	font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
	background: var(--paper);
	color: var(--ink);
	line-height: 1.5;
}

a { color: var(--teal-dark); }
img { max-width: 100%; }

.topbar {
	background: linear-gradient(120deg, #042f2e 0%, #0f766e 55%, #4c1d95 130%);
	color: var(--white);
	padding: 0.85rem 1.25rem;
}
.topbar-inner, .wrap, .footer-inner {
	max-width: var(--max);
	margin: 0 auto;
}
.topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}
.brand {
	color: #fff;
	text-decoration: none;
	font-weight: 700;
	letter-spacing: 0.02em;
}
.brand small {
	display: block;
	font-weight: 500;
	opacity: 0.8;
	font-size: 0.75rem;
}
.top-actions {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	font-size: 0.85rem;
}
.pill {
	background: rgba(255,255,255,0.14);
	border: 1px solid rgba(255,255,255,0.22);
	padding: 0.35rem 0.7rem;
	border-radius: 999px;
}
.preview-flag {
	background: #fbbf24;
	color: #1c1917;
	font-weight: 700;
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hero {
	max-width: var(--max);
	margin: 1.5rem auto 0;
	padding: 0 1.25rem;
}
.hero-card {
	background: var(--white);
	border-radius: calc(var(--radius) + 4px);
	box-shadow: var(--shadow);
	padding: 1.6rem 1.5rem 1.4rem;
}
.hero h1 {
	margin: 0 0 0.5rem;
	font-size: clamp(1.6rem, 3vw, 2.15rem);
}
.hero p { margin: 0 0 1rem; color: var(--muted); }
.paths {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.85rem;
}
.path {
	border-radius: 12px;
	padding: 1rem;
	text-decoration: none;
	color: inherit;
	border: 1px solid var(--line);
	display: block;
}
.path strong { display: block; margin-bottom: 0.2rem; }
.path.explore { background: #f5f3ff; border-color: #ddd6fe; }
.path.ges { background: #f0fdfa; border-color: #99f6e4; }
.path span { color: var(--muted); font-size: 0.92rem; }

.filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 1.4rem 0 1rem;
}
.filters a {
	text-decoration: none;
	padding: 0.4rem 0.85rem;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: var(--white);
	color: var(--ink);
	font-size: 0.9rem;
}
.filters a.active {
	background: var(--ink);
	color: #fff;
	border-color: var(--ink);
}

.section-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	margin: 0 0 0.75rem;
}
.section-head h2 { margin: 0; font-size: 1.2rem; }
.section-head p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 0.9rem;
	margin-bottom: 2rem;
}
.card {
	background: var(--white);
	border-radius: var(--radius);
	border: 1px solid var(--line);
	padding: 1.05rem 1.1rem 1rem;
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	min-height: 170px;
	box-shadow: 0 1px 0 rgba(15,23,42,0.03);
}
.card:hover { border-color: #99f6e4; }
.card.explore:hover { border-color: #c4b5fd; }
.badge {
	align-self: flex-start;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 0.2rem 0.5rem;
	border-radius: 999px;
	margin-bottom: 0.55rem;
}
.badge.explore { background: #ede9fe; color: var(--purple); }
.badge.ges { background: #ccfbf1; color: var(--teal-dark); }
.card h3 {
	margin: 0 0 0.35rem;
	font-size: 1.05rem;
}
.card p {
	margin: 0;
	color: var(--muted);
	font-size: 0.9rem;
	flex: 1;
}
.meta {
	margin-top: 0.8rem;
	font-size: 0.8rem;
	color: var(--teal-dark);
	font-weight: 600;
}

.crumb {
	max-width: var(--max);
	margin: 1rem auto 0;
	padding: 0 1.25rem;
	font-size: 0.9rem;
	color: var(--muted);
}
.crumb a { color: var(--teal-dark); }

.course-hero, .lesson-shell {
	max-width: var(--max);
	margin: 0.75rem auto 2rem;
	padding: 0 1.25rem 2rem;
}
.course-hero .panel, .lesson-shell .panel {
	background: var(--white);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 1.3rem 1.25rem;
}
.topic { margin-top: 1.4rem; }
.topic h3 { margin: 0 0 0.5rem; }
.lessons { list-style: none; padding: 0; margin: 0; }
.lessons li {
	border-top: 1px solid var(--line);
}
.lessons a, .lessons .locked {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.75rem 0.15rem;
	text-decoration: none;
	color: inherit;
}
.lessons .locked { opacity: 0.72; }
.status {
	font-size: 0.75rem;
	font-weight: 700;
	white-space: nowrap;
}
.status.ready { color: var(--teal); }
.status.draft { color: #b45309; }

.lesson-shell .panel { padding: 1.5rem 1.4rem 2rem; }
.nav-lessons {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--line);
}

footer {
	border-top: 1px solid var(--line);
	padding: 1.2rem 1.25rem 2rem;
	color: var(--muted);
	font-size: 0.85rem;
}

@media (max-width: 720px) {
	.paths { grid-template-columns: 1fr; }
	.topbar-inner { flex-wrap: wrap; }
	.card h3 {
		font-size: 1rem;
	}
}
