@font-face { font-family: 'Manrope'; font-weight: 500; font-display: swap; src: url(fonts/manrope-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 600; font-display: swap; src: url(fonts/manrope-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 700; font-display: swap; src: url(fonts/manrope-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 100 900; font-display: swap; src: url(fonts/inter-latin-wght-normal.woff2) format('woff2'); }

:root {
  --midnight: #050F22; --navy: #0B2545; --blue: #1660D6; --blue-dark: #0F4DB8; --cyan: #2BB3F0;
  --page: #F4F6FA; --card: #FFFFFF; --mist: #EEF1F5; --line: #DCE1E8; --slate: #4A5A73;
  --green: #0E8A5F; --green-bg: #E4F6EE; --amber: #9A5B00; --amber-bg: #FFF3DC; --red: #B42318; --red-bg: #FDECEA;
  --display: 'Manrope', system-ui, sans-serif; --body: 'Inter', system-ui, sans-serif;
  --radius: 20px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--navy); font-family: var(--body); font-size: 16px; line-height: 1.6; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(34px, 5.4vw, 60px); font-weight: 500; letter-spacing: -0.04em; }
h2 { font-size: clamp(26px, 3.4vw, 38px); }
h3 { font-size: 20px; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--blue); }
img { max-width: 100%; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--slate); }
.small { font-size: 14px; }
.eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(244, 246, 250, 0.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--navy); }
.brand b { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -0.05em; }
.brand b i { font-style: normal; color: var(--blue); }
.brand span { font-size: 12px; color: var(--slate); white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a, .nav button.link { font: 500 15px var(--body); color: var(--navy); text-decoration: none; padding: 10px 12px; border-radius: 999px; background: none; border: 0; cursor: pointer; }
.nav a:hover, .nav button.link:hover { background: var(--mist); }
.nav form { margin: 0; }
.nav a.btn { background: var(--blue); color: #fff; font-weight: 600; }
.nav a.btn:hover { background: var(--blue-dark); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; border-radius: 999px; border: 0; cursor: pointer; font: 600 16px var(--body); text-decoration: none; background: var(--blue); color: #fff; transition: background 150ms ease, transform 150ms ease; }
.btn:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn.ghost { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { background: var(--mist); }
.btn.dark { background: var(--midnight); }
.btn.block { width: 100%; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* Cards and chips */
.card { background: var(--card); border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--mist); color: var(--navy); white-space: nowrap; }
.chip.blue { background: #E3EDFC; color: var(--blue-dark); }
.chip.green { background: var(--green-bg); color: var(--green); }
.chip.amber { background: var(--amber-bg); color: var(--amber); }
.notice { border-radius: 16px; padding: 14px 18px; font-size: 15px; margin-bottom: 20px; }
.notice.good { background: var(--green-bg); color: #075C3F; }
.notice.warn { background: var(--amber-bg); color: #6B4000; }
.notice.bad { background: var(--red-bg); color: var(--red); }

/* Progress bar */
.bar { height: 10px; border-radius: 999px; background: var(--mist); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width 400ms ease; }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--midnight); color: #fff; }
.hero::before { content: ''; position: absolute; right: -200px; top: -260px; width: 820px; height: 820px; border-radius: 50%; background: radial-gradient(closest-side, rgba(22, 96, 214, 0.85), rgba(5, 15, 34, 0)); }
.hero::after { content: ''; position: absolute; left: -220px; bottom: -380px; width: 640px; height: 640px; border-radius: 50%; background: radial-gradient(closest-side, rgba(43, 179, 240, 0.2), rgba(5, 15, 34, 0)); }
.hero .wrap { position: relative; z-index: 1; padding: clamp(48px, 8vw, 96px) 0; display: grid; gap: 40px; }
.hero p.lead { font-size: clamp(17px, 2vw, 20px); color: #C9D6EA; max-width: 560px; margin-top: 18px; }
.hero .eyebrow { color: var(--cyan); }
.hero .acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .btn.ghost { background: rgba(255, 255, 255, 0.08); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.25); }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.15fr 1fr; align-items: center; } }

/* The little lesson preview in the hero */
.demo { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 24px; padding: 20px; display: grid; gap: 12px; }
.demo .row { display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, 0.07); border-radius: 14px; padding: 12px 14px; font-size: 15px; }
.demo .tick { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; background: var(--cyan); color: var(--midnight); }
.demo .tick.todo { background: transparent; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35); color: transparent; }
.demo .row.now { background: var(--blue); }
.demo .row span.t { margin-left: auto; font-size: 13px; color: #C9D6EA; white-space: nowrap; }

section.block { padding: clamp(44px, 7vw, 80px) 0; }
.grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .grid.c2 { grid-template-columns: 1fr 1fr; } .grid.c3 { grid-template-columns: repeat(3, 1fr); } .grid.c4 { grid-template-columns: repeat(4, 1fr); } }
.step .n { font-family: var(--display); font-weight: 500; font-size: 44px; letter-spacing: -0.05em; line-height: 1; color: var(--blue); }
.step h3 { margin: 14px 0 6px; }

/* Course card */
.course-card { display: grid; gap: 14px; text-decoration: none; color: inherit; transition: transform 160ms ease, box-shadow 160ms ease; }
.course-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(11, 37, 69, 0.1); }
.course-card .art { height: 150px; border-radius: 14px; background: var(--midnight); position: relative; overflow: hidden; display: grid; place-items: center; }
.course-card .art::before { content: ''; position: absolute; inset: -60% -20% auto auto; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(closest-side, rgba(22, 96, 214, 0.9), rgba(5, 15, 34, 0)); }
.flow { position: relative; display: flex; align-items: center; gap: 10px; }
.flow span { width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); display: grid; place-items: center; color: #fff; font: 700 15px var(--display); }
.flow span.on { background: var(--blue); border-color: var(--blue); }
.flow i { width: 26px; border-top: 2px dashed var(--cyan); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; }
.price { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -0.03em; }

/* Course page */
.course-head { background: var(--midnight); color: #fff; position: relative; overflow: hidden; }
.course-head::before { content: ''; position: absolute; right: -200px; top: -300px; width: 760px; height: 760px; border-radius: 50%; background: radial-gradient(closest-side, rgba(22, 96, 214, 0.8), rgba(5, 15, 34, 0)); }
.course-head .wrap { position: relative; padding: clamp(36px, 6vw, 64px) 0; display: grid; gap: 28px; }
.course-head p.lead { color: #C9D6EA; font-size: 18px; margin-top: 14px; max-width: 620px; }
.course-head .chip { background: rgba(255, 255, 255, 0.1); color: #fff; }
@media (min-width: 900px) { .course-head .wrap { grid-template-columns: 1.5fr 1fr; align-items: start; } }
.buy { color: var(--navy); display: grid; gap: 14px; }
.buy ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 15px; color: var(--slate); }
.buy li { padding-left: 26px; position: relative; }
.buy li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; }

ul.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
ul.ticks li { position: relative; padding-left: 30px; }
ul.ticks li::before { content: ''; position: absolute; left: 4px; top: 0.5em; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); }

.module { padding: 0; overflow: hidden; }
.module > header { padding: 20px 24px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.module > header p { color: var(--slate); font-size: 15px; margin-top: 4px; }
.lessons { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.lessons li { border-bottom: 1px solid var(--line); }
.lessons li:last-child { border-bottom: 0; }
.lessons a, .lessons div.row { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; padding: 14px 24px; text-decoration: none; color: inherit; min-height: 56px; }
.lessons a:hover { background: var(--mist); }
.dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--mist); color: var(--slate); }
.dot.done { background: var(--green); color: #fff; }
.dot.next { background: var(--blue); color: #fff; }
.lessons .t { font-weight: 500; }
.lessons .soon .t, .lessons .locked .t { color: var(--slate); }
.lessons .right { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--slate); white-space: nowrap; }

/* Lesson page */
.lesson-top { background: #fff; border-bottom: 1px solid var(--line); }
.lesson-top .narrow { padding: 18px 0; display: grid; gap: 10px; }
.crumbs { font-size: 14px; color: var(--slate); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--slate); }
.prose { font-size: 17.5px; line-height: 1.75; }
.prose h2 { font-size: 26px; margin: 40px 0 12px; }
.prose h3 { margin: 28px 0 8px; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose table, .prose pre { margin: 0 0 18px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose strong { font-weight: 600; }
.prose blockquote { margin-left: 0; margin-right: 0; padding: 16px 20px; border-radius: 16px; background: #E3EDFC; color: var(--navy); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { font-size: 0.9em; background: var(--mist); padding: 2px 6px; border-radius: 6px; }
.prose pre { background: var(--midnight); color: #E6EEFA; padding: 18px; border-radius: 16px; overflow-x: auto; font-size: 15px; line-height: 1.6; white-space: pre-wrap; }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; background: var(--mist); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

.quiz { display: grid; gap: 18px; }
.quiz fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.quiz legend { font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; margin-bottom: 8px; padding: 0; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; min-height: 50px; }
.opt:hover { border-color: var(--blue); }
.opt input { margin-top: 5px; accent-color: var(--blue); width: 18px; height: 18px; flex: none; }
.opt:has(input:checked) { border-color: var(--blue); background: #F0F5FE; }
.opt.right { border-color: var(--green); background: var(--green-bg); }
.opt.wrong { border-color: var(--red); background: var(--red-bg); }
.why { font-size: 15px; color: var(--slate); padding: 4px 4px 0; }
.result { text-align: center; display: grid; gap: 10px; justify-items: center; }
.result .big { font-family: var(--display); font-weight: 700; font-size: 56px; letter-spacing: -0.05em; line-height: 1; }
.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 32px 0 64px; }

/* Forms */
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: 15px; }
.form input, .form select { font: 400 16px var(--body); color: var(--navy); padding: 13px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; min-height: 50px; width: 100%; }
.form input:focus, .form select:focus { border-color: var(--blue); }
.form .hint { font-weight: 400; font-size: 13.5px; color: var(--slate); }
.auth { min-height: calc(100vh - 65px); display: grid; place-items: center; padding: 32px 0; }
.auth .card { width: min(440px, 100% - 32px); display: grid; gap: 20px; padding: 28px; }

/* Dashboard */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat b { display: block; font-family: var(--display); font-weight: 700; font-size: 34px; letter-spacing: -0.04em; line-height: 1.1; }
.stat span { font-size: 14px; color: var(--slate); }

/* Tables (admin) */
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate); font-weight: 600; }
.scroll { overflow-x: auto; }

footer.site { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--slate); }
footer.site .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 560px) {
  .brand span { display: none; }
  .brand b { white-space: nowrap; font-size: 22px; }
  .nav { gap: 2px; flex-wrap: nowrap; }
  .nav a, .nav button.link { padding: 10px 8px; font-size: 14px; white-space: nowrap; }
  .nav a.btn { padding: 8px 14px !important; }
  .card { padding: 20px; }
  .lessons a, .lessons div.row { padding: 14px 16px; grid-template-columns: 28px 1fr auto; gap: 10px; }
  .module > header { padding: 18px 16px; }
  .prose { font-size: 17px; }
  .lessons .right .mins { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
#quiz { scroll-margin-top: 84px; }

/* ---------- Livelier look: accents, icons, thumbnails, rings ---------- */
:root { --violet: #6D4AE8; --pink: #E8497F; --orange: #F08A24; --teal: #12A594; --yellow: #F5B82E; }
.ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.blue { background: #E3EDFC; color: var(--blue); } .ico.teal { background: #DDF5F1; color: #0C7C6F; }
.ico.orange { background: #FDEBD7; color: #B25C07; } .ico.violet { background: #EBE5FD; color: #5433CC; } .ico.pink { background: #FCE1EA; color: #C02A5E; }

.hero-art { position: relative; padding: 58px 18px 62px; }
.float { position: absolute; z-index: 2; background: #fff; color: var(--navy); border-radius: 16px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 18px 40px rgba(2, 8, 20, 0.45); animation: bob 5s ease-in-out infinite; }
.float b { display: block; font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.03em; line-height: 1.1; }
.float div span { font-size: 12.5px; color: var(--slate); }
.float .ico { width: 40px; height: 40px; border-radius: 12px; }
.float.a { left: -14px; top: -8px; } .float.b { right: -26px; top: -22px; animation-delay: -1.6s; } .float.c { left: 10%; bottom: -6px; animation-delay: -3.2s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (max-width: 899px) { .float.a { left: 0; } .float.b { display: none; } .hero-art { padding: 64px 0 66px; } }
@media (prefers-reduced-motion: reduce) { .float { animation: none; } }

.features { margin-top: -44px; position: relative; z-index: 3; }
.features .card { display: flex; gap: 14px; align-items: flex-start; box-shadow: 0 14px 34px rgba(11, 37, 69, 0.08); }
.features h3 { font-size: 17px; margin-bottom: 2px; }
.features p { font-size: 14.5px; color: var(--slate); line-height: 1.45; }

/* Course thumbnails */
.thumb { position: relative; height: 170px; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; color: #fff; background: linear-gradient(135deg, #0B2A6B, #1660D6 55%, #2BB3F0); }
.thumb::before { content: ''; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.thumb::after { content: ''; position: absolute; right: 50px; bottom: -70px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); }
.thumb .tag { position: absolute; left: 14px; top: 14px; z-index: 1; font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: var(--yellow); color: #3D2B00; padding: 4px 10px; border-radius: 999px; }
.thumb .big { position: relative; z-index: 1; font-family: var(--display); font-weight: 700; font-size: 30px; letter-spacing: -0.04em; line-height: 1; }
.thumb .sub { position: relative; z-index: 1; font-size: 13px; opacity: 0.9; margin-top: 4px; }
.thumb .glyph { position: absolute; right: 18px; top: 18px; z-index: 1; display: flex; align-items: center; gap: 8px; }
.thumb .glyph span { width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.3); display: grid; place-items: center; font: 700 13px var(--display); }
.thumb .glyph span.on { background: #fff; color: var(--blue); }
.thumb .glyph i { width: 16px; border-top: 2px dashed rgba(255, 255, 255, 0.7); }
.thumb.soon { background: linear-gradient(135deg, #3A2A8C, #6D4AE8 60%, #B79CFF); }
.thumb.soon2 { background: linear-gradient(135deg, #8A2A4E, #E8497F 60%, #F9A8C4); }
.thumb.soon3 { background: linear-gradient(135deg, #0B5E55, #12A594 60%, #7FE0D3); }
.course-card.tight { padding: 14px; gap: 12px; }
.course-card.tight h3 { font-size: 20px; }
.course-card .by { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--slate); }
.course-card .by img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: top; }

/* Stats band */
.band { background: var(--midnight); color: #fff; border-radius: 24px; padding: 28px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; position: relative; overflow: hidden; }
.band::before { content: ''; position: absolute; right: -120px; top: -200px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(closest-side, rgba(22, 96, 214, 0.75), rgba(5, 15, 34, 0)); }
.band div { position: relative; display: flex; align-items: center; gap: 14px; }
.band b { display: block; font-family: var(--display); font-weight: 700; font-size: 30px; letter-spacing: -0.04em; line-height: 1.05; }
.band span { font-size: 14px; color: #C9D6EA; }
.band .ico { background: rgba(255, 255, 255, 0.1); color: var(--cyan); }
@media (min-width: 820px) { .band { grid-template-columns: repeat(4, 1fr); padding: 30px 36px; } }

.teacher { display: grid; gap: 24px; align-items: center; }
.teacher img { width: 100%; max-width: 300px; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: 20px; }
@media (min-width: 760px) { .teacher { grid-template-columns: 300px 1fr; gap: 40px; } }
.cta { background: linear-gradient(120deg, #0F4DB8, #1660D6 55%, #2BB3F0); color: #fff; border-radius: 24px; padding: clamp(28px, 5vw, 48px); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta p { color: #E3EDFC; margin-top: 8px; max-width: 520px; }
.cta .btn { background: #fff; color: var(--blue-dark); }

/* Dashboard */
.dash { display: grid; gap: 24px; }
@media (min-width: 1000px) { .dash { grid-template-columns: 1.55fr 1fr; align-items: start; } }
.welcome { background: linear-gradient(120deg, #0F4DB8, #1660D6 55%, #2BB3F0); color: #fff; border-radius: 24px; padding: 28px; position: relative; overflow: hidden; }
.welcome::after { content: ''; position: absolute; right: -60px; bottom: -110px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.welcome p { color: #E3EDFC; margin: 8px 0 18px; max-width: 460px; position: relative; }
.welcome h1, .welcome .btn, .welcome .eyebrow { position: relative; }
.welcome .eyebrow { color: #CFE4FF; }
.welcome .btn { background: #fff; color: var(--blue-dark); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { display: flex; align-items: center; gap: 14px; padding: 18px; }
.tile b { display: block; font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -0.03em; line-height: 1.1; }
.tile div span { font-size: 13.5px; color: var(--slate); line-height: 1.3; display: block; }
.ring { --p: 0; --c: var(--blue); width: 58px; height: 58px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--mist) 0); }
.ring::before { content: attr(data-label); width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; font: 700 14px var(--display); color: var(--navy); }
.chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 150px; margin-top: 18px; }
.chart .col { display: grid; grid-template-rows: 1fr auto; gap: 8px; height: 100%; text-align: center; font-size: 12.5px; color: var(--slate); }
.chart .track { display: flex; align-items: flex-end; justify-content: center; background: var(--mist); border-radius: 10px; overflow: hidden; position: relative; }
.chart .fill { width: 100%; border-radius: 10px; background: linear-gradient(180deg, var(--cyan), var(--blue)); min-height: 0; }
.chart .n { position: absolute; top: 6px; left: 0; right: 0; font-weight: 600; color: var(--navy); font-size: 12.5px; }
.chart .col.today { color: var(--blue); font-weight: 600; }
@media (max-width: 420px) { .tile { flex-direction: column; align-items: flex-start; gap: 10px; } }

/* ---------- Juniors and family ---------- */
.thumb.violet { background: linear-gradient(135deg, #3A2A8C, #6D4AE8 60%, #B79CFF); }
.thumb.pink { background: linear-gradient(135deg, #8A2A4E, #E8497F 60%, #F9A8C4); }
.thumb.teal { background: linear-gradient(135deg, #0B5E55, #12A594 60%, #7FE0D3); }
.jr-hero { background: #24165F; }
.jr-hero::before { background: radial-gradient(closest-side, rgba(109, 74, 232, 0.95), rgba(36, 22, 95, 0)); }
.jr-hero::after { background: radial-gradient(closest-side, rgba(232, 73, 127, 0.35), rgba(36, 22, 95, 0)); }
.jr-hero .btn.ghost { color: #fff; }
.jr-band { background: linear-gradient(120deg, #3A2A8C, #6D4AE8 60%, #9B7BF5); color: #fff; border-radius: 24px; padding: clamp(24px, 4.5vw, 44px); display: grid; gap: 28px; align-items: center; }
.jr-band p { color: #EDE7FF; max-width: 520px; }
.jr-band .btn { background: #fff; color: #3A2A8C; }
.jr-band .card { color: var(--navy); }
.jr-cards { display: grid; gap: 14px; }
@media (min-width: 860px) { .jr-band { grid-template-columns: 1.4fr 1fr; } }
.badges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.badge { display: grid; gap: 2px; justify-items: start; padding: 12px; border-radius: 14px; background: var(--mist); opacity: 0.55; filter: grayscale(1); }
.badge.got { opacity: 1; filter: none; background: #F3F7FE; box-shadow: inset 0 0 0 1.5px #CFE0FB; }
.badge .ico { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 6px; }
.badge b { font-size: 14.5px; }
.badge > span:last-child { font-size: 12.5px; color: var(--slate); line-height: 1.3; }
.kid-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #6D4AE8, #2BB3F0); color: #fff; display: grid; place-items: center; font: 700 24px var(--display); flex: none; }
.kid-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.kid-stats b { display: block; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.kid-stats span { font-size: 13px; color: var(--slate); }
.kid-course { background: var(--mist); border-radius: 16px; padding: 16px; }
.kid-more { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.kid-more summary { cursor: pointer; font-weight: 600; font-size: 15px; color: var(--blue); min-height: 32px; }
.form label.consent { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 14.5px; background: var(--mist); padding: 14px; border-radius: 14px; }
.form label.consent input { width: 20px; height: 20px; min-height: 0; flex: none; margin-top: 2px; accent-color: var(--blue); }

/* ---------- Lesson player ---------- */
.lesson-hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(120deg, #0B2A6B, #1660D6 60%, #2BB3F0); }
.lesson-hero.violet { background: linear-gradient(120deg, #2A1B73, #6D4AE8 60%, #A98BFA); }
.lesson-hero.pink { background: linear-gradient(120deg, #7A1F42, #E8497F 60%, #F9A8C4); }
.lesson-hero.teal { background: linear-gradient(120deg, #0A4F47, #12A594 60%, #7FE0D3); }
.lesson-hero::before { content: ''; position: absolute; right: -80px; top: -140px; width: 420px; height: 420px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); }
.lesson-hero::after { content: ''; position: absolute; right: 180px; bottom: -160px; width: 300px; height: 300px; border-radius: 50%; background: rgba(255, 255, 255, 0.07); }
.lesson-hero .wrap { position: relative; z-index: 1; padding: 28px 0 34px; }
.lesson-hero .crumbs, .lesson-hero .crumbs a { color: rgba(255, 255, 255, 0.85); }
.lesson-hero .chip { background: rgba(255, 255, 255, 0.16); color: #fff; }
.lesson-hero .chip.done { background: #fff; color: var(--green); }
.lesson-hero h1 { font-size: clamp(30px, 4.6vw, 48px); margin: 14px 0 22px; max-width: 820px; }
.steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 600; }
.steps span { padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.8); }
.steps span.on { background: #fff; color: var(--navy); }
.steps i { width: 22px; border-top: 2px dashed rgba(255, 255, 255, 0.5); }
.lesson-grid { display: grid; gap: 24px; padding-top: 28px; align-items: start; }
@media (min-width: 1000px) { .lesson-grid { grid-template-columns: minmax(0, 1fr) 320px; } .lesson-side { position: sticky; top: 84px; } }
.lesson-side { display: grid; gap: 16px; }
.prose-card { padding: clamp(20px, 4vw, 40px); }
.prose h2 { display: flex; align-items: center; gap: 12px; }
.prose h2::before { content: ''; width: 10px; height: 26px; border-radius: 6px; background: linear-gradient(180deg, var(--cyan), var(--blue)); flex: none; }
.prose blockquote { position: relative; padding: 18px 20px 18px 58px; background: linear-gradient(120deg, #E3EDFC, #EEF6FF); border: 1px solid #CFE0FB; }
.prose blockquote::before { content: '💡'; position: absolute; left: 18px; top: 16px; font-size: 22px; }
.prose ol { counter-reset: n; list-style: none; padding-left: 0; }
.prose ol > li { counter-increment: n; position: relative; padding-left: 42px; }
.prose ol > li::before { content: counter(n); position: absolute; left: 0; top: 1px; width: 28px; height: 28px; border-radius: 50%; background: #E3EDFC; color: var(--blue-dark); font: 700 14px var(--display); display: grid; place-items: center; }
.prose ul > li::marker { color: var(--cyan); }
.tablewrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); margin-bottom: 18px; }
.prose .tablewrap table { display: table; margin: 0; }
.prose th { background: var(--navy); color: #fff; }
.prose tr:nth-child(even) td { background: #F7F9FC; }
.prose td { border-bottom: 0; }
.tryit { margin-top: 36px; border-radius: 20px; padding: clamp(18px, 3vw, 28px); background: linear-gradient(120deg, #FFF6E0, #FFEFD0); border: 1.5px dashed #F0B85C; }
.tryit-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tryit-ico { width: 44px; height: 44px; border-radius: 14px; background: var(--orange); color: #fff; display: grid; place-items: center; font-size: 22px; flex: none; }
.prose .tryit h2 { margin: 0; font-size: 24px; } .prose .tryit h2::before { display: none; }
.prose .tryit ol > li::before { background: #fff; color: #9A5B00; }
.prose .tryit > *:last-child { margin-bottom: 0; }
.quiz-card { margin-top: 24px; position: relative; overflow: hidden; padding: clamp(20px, 4vw, 36px); border-top: 5px solid var(--violet); }
.quiz-card.passed { border-top-color: var(--green); }
.quiz-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.quiz-head h2 { font-size: 26px; margin-top: 2px; }
.quiz legend { display: flex; gap: 12px; align-items: flex-start; }
.qn { flex: none; width: 30px; height: 30px; border-radius: 10px; background: var(--violet); color: #fff; display: grid; place-items: center; font: 700 15px var(--display); margin-top: -2px; }
.qn.ok { background: var(--green); } .qn.no { background: var(--red); }
.quiz fieldset { padding: 18px; border-radius: 18px; background: #F7F9FC; }
.why { background: #fff; border-radius: 12px; padding: 10px 14px; }
.score-ring { --p: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--orange) calc(var(--p) * 1%), var(--mist) 0); }
.score-ring.ok { background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--mist) 0); }
.score-ring b { width: 104px; height: 104px; border-radius: 50%; background: #fff; display: grid; place-items: center; font: 700 34px var(--display); letter-spacing: -0.04em; }
.result h2 { font-size: 30px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -16px; left: calc(var(--x) * 1%); width: 10px; height: 16px; border-radius: 3px; background: var(--c); opacity: 0; animation: fall 2.6s ease-in calc(var(--d) * 0.12s) 1 forwards; }
@keyframes fall { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(520px) rotate(540deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }
.side-list { list-style: none; margin: 0; padding: 0 8px 10px; }
.side-list a, .side-list div { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: inherit; font-size: 14.5px; line-height: 1.35; }
.side-list a:hover { background: var(--mist); }
.side-list li.here a, .side-list li.here div { background: #E3EDFC; font-weight: 600; }
.side-list em { font-style: normal; color: var(--slate); font-size: 12.5px; }
.side-list div { color: var(--slate); }
.tipcard { display: flex; gap: 14px; align-items: center; background: linear-gradient(120deg, #FFF6E0, #FFEFD0); border-color: #F6D9A4; }
.tipcard p { color: #6B4000; }

/* ---------- Course page ---------- */
.course-head { background: linear-gradient(120deg, #050F22, #0B2A6B 70%, #1660D6); }
.course-head.violet { background: linear-gradient(120deg, #170F44, #3A2A8C 65%, #6D4AE8); }
.module > header .mnum { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font: 700 20px var(--display); color: #fff; flex: none; }
.module:nth-child(6n+1) .mnum { background: var(--blue); } .module:nth-child(6n+2) .mnum { background: var(--violet); } .module:nth-child(6n+3) .mnum { background: var(--teal); }
.module:nth-child(6n+4) .mnum { background: var(--orange); } .module:nth-child(6n+5) .mnum { background: var(--pink); } .module:nth-child(6n) .mnum { background: var(--navy); }
.module > header { align-items: center; }
.module > header .mh { display: flex; gap: 16px; align-items: center; }
.info-card { position: relative; overflow: hidden; }
.info-card .ico { margin-bottom: 14px; }

/* ---------- Sign up and log in ---------- */
.auth2 { min-height: calc(100vh - 65px); display: grid; }
.auth2 .side { display: none; position: relative; overflow: hidden; color: #fff; padding: 56px; background: linear-gradient(140deg, #050F22, #0B2A6B 55%, #1660D6); }
.auth2 .side::before { content: ''; position: absolute; right: -160px; bottom: -200px; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(closest-side, rgba(43, 179, 240, 0.45), rgba(5, 15, 34, 0)); }
.auth2 .side > * { position: relative; }
.auth2 .side h2 { font-size: 40px; font-weight: 500; letter-spacing: -0.04em; max-width: 420px; }
.auth2 .side ul { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; }
.auth2 .side li { display: flex; gap: 14px; align-items: center; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 16px; padding: 14px 16px; max-width: 420px; }
.auth2 .side li .ico { background: rgba(255, 255, 255, 0.14); color: var(--cyan); width: 42px; height: 42px; }
.auth2 .formside { display: grid; place-items: center; padding: 32px 0; }
.auth2 .formside .card { width: min(440px, 100% - 32px); display: grid; gap: 20px; padding: 28px; box-shadow: 0 20px 50px rgba(11, 37, 69, 0.08); }
@media (min-width: 900px) { .auth2 { grid-template-columns: 1fr 1fr; } .auth2 .side { display: flex; flex-direction: column; justify-content: center; } }
.quiz legend { float: left; width: 100%; margin-bottom: 12px; }
.quiz legend + * { clear: both; }

.prose li.check { list-style: none; position: relative; margin-left: -24px; padding-left: 34px; }
.prose li.check::before { content: ''; position: absolute; left: 0; top: 0.3em; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--blue); background: #fff; }

/* very small phones: keep the top bar on one line */
@media (max-width: 380px) {
  .top .wrap { gap: 6px; }
  .brand b { font-size: 20px; }
  .nav a, .nav button.link { padding: 10px 6px; font-size: 13.5px; }
  .nav a.btn { padding: 8px 12px !important; }
}

/* logged-in menu has up to four items: give it its own row on phones */
@media (max-width: 480px) {
  .top .wrap:has(.nav form) { flex-wrap: wrap; padding-block: 6px; }
  .top .wrap:has(.nav form) .nav { width: 100%; justify-content: space-between; }
}

/* phones: one tidy top bar, stats stacked so nothing is cut off */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 560px) {
  .nav a.hide-sm { display: none; }
  .brand { flex: none; }
  .nav { margin-left: auto; }
  .nav a.btn { min-height: 40px !important; display: inline-flex; align-items: center; }
  .band { grid-template-columns: 1fr; gap: 18px; padding: 24px 22px; }
  .band div { min-width: 0; }
  .band p { min-width: 0; }
  .band b { font-size: 26px; overflow-wrap: anywhere; }
  .band .ico { flex: none; }
}
