:root {
  --bg: #F6F5F1;
  --surface: #FFFFFF;
  --ink: #111114;
  --muted: #6B6B76;
  --line: #E4E2DC;
  --accent: #6C4DFF;
  --accent-ink: #FFFFFF;
  --lime: #D4FF3A;
  --ok: #18A058;
  --radius: 18px;
  --font: "Manrope", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 700; transition: transform .15s, background .15s, opacity .15s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #5A3BF0; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: default; }

/* Header */
.header { position: sticky; top: 0; z-index: 20; background: rgba(246,245,241,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { font-weight: 800; font-size: 20px; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: var(--lime); display: grid; place-items: center; font-size: 15px; }
.nav { display: flex; gap: 28px; font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--accent); }
@media (max-width: 820px) { .nav { display: none; } }

/* Typography */
h1 { font-size: clamp(36px, 6vw, 72px); line-height: 1.02; letter-spacing: -.035em; font-weight: 800; }
h2 { font-size: clamp(28px, 4vw, 46px); line-height: 1.08; letter-spacing: -.03em; font-weight: 800; }
h3 { font-size: 20px; letter-spacing: -.01em; font-weight: 800; }
.lead { font-size: 19px; color: var(--muted); max-width: 560px; }
.muted { color: var(--muted); }
.tag { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.tag-lime { background: var(--lime); border-color: var(--lime); }

section { padding: 88px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.hero h1 .hl { background: var(--lime); padding: 0 .12em; border-radius: 10px; }
.hero .lead { margin: 24px 0 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-card { background: var(--ink); color: #fff; border-radius: 28px; padding: 28px; position: relative; overflow: hidden; min-height: 380px; display: flex; flex-direction: column; justify-content: space-between; }
.hero-card::after { content: ""; position: absolute; width: 280px; height: 280px; right: -80px; top: -80px; background: radial-gradient(circle, var(--accent), transparent 70%); opacity: .8; }
.chat-bubble { background: #24242B; padding: 12px 16px; border-radius: 16px; font-size: 15px; max-width: 85%; position: relative; z-index: 1; }
.chat-bubble.me { background: var(--lime); color: var(--ink); margin-left: auto; }
.hero-stats { display: flex; gap: 28px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats b { font-size: 28px; display: block; letter-spacing: -.02em; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* Cards / grid */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card .ico { font-size: 28px; margin-bottom: 14px; }
.card p { color: var(--muted); margin-top: 8px; }

/* Program accordion */
.module { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.module summary { list-style: none; cursor: pointer; padding: 22px 24px; display: flex; gap: 20px; align-items: center; }
.module summary::-webkit-details-marker { display: none; }
.module .num { font-weight: 800; color: var(--accent); min-width: 32px; }
.module .title { font-weight: 800; font-size: 18px; flex: 1; }
.module .plus { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; transition: transform .2s; flex-shrink: 0; }
.module[open] .plus { transform: rotate(45deg); background: var(--lime); border-color: var(--lime); }
.module ul { list-style: none; padding: 0 24px 22px 76px; color: var(--muted); }
.module li { padding: 6px 0; border-top: 1px dashed var(--line); }
@media (max-width: 620px) { .module ul { padding-left: 24px; } }

/* Pricing */
.price-card { display: flex; flex-direction: column; gap: 16px; }
.price-card.featured { background: var(--ink); color: #fff; border-color: var(--ink); }
.price-card.featured p, .price-card.featured .muted { color: #A9A9B5; }
.price { font-size: 48px; font-weight: 800; letter-spacing: -.03em; }
.price s { font-size: 22px; color: var(--muted); font-weight: 600; margin-left: 8px; }
.checklist { list-style: none; display: grid; gap: 10px; }
.checklist li { padding-left: 28px; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--lime); color: var(--ink); font-size: 12px; font-weight: 800; display: grid; place-items: center; top: 2px; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { margin-top: 10px; color: var(--muted); }

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

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 700; }
.input { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); outline: none; transition: border-color .15s; }
.input:focus { border-color: var(--accent); }

/* Checkout */
.checkout { display: grid; grid-template-columns: 1fr 400px; gap: 24px; padding: 40px 0 80px; align-items: start; }
@media (max-width: 900px) { .checkout { grid-template-columns: 1fr; } }
.steps { display: flex; gap: 8px; margin-bottom: 24px; font-size: 14px; font-weight: 700; color: var(--muted); flex-wrap: wrap; }
.steps span.active { color: var(--ink); }
.tariff { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; margin-bottom: 10px; background: var(--surface); transition: border-color .15s; }
.tariff:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,77,255,.12); }
.tariff input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; flex-shrink: 0; }
.tariff .t-body { flex: 1; }
.tariff .t-price { font-weight: 800; white-space: nowrap; }
.bump { border-style: dashed; background: #FBFFE9; border-color: #C8E05A; }
.bump .badge { font-size: 12px; font-weight: 800; background: var(--lime); padding: 2px 8px; border-radius: 6px; margin-left: 6px; }
.summary { position: sticky; top: 88px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 15px; }
.summary-total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px; font-weight: 800; font-size: 22px; }
.demo-note { font-size: 13px; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 10px 12px; margin-top: 12px; }
.check-row { display: flex; gap: 10px; font-size: 13px; color: var(--muted); margin: 14px 0; align-items: flex-start; }
.check-row input { accent-color: var(--accent); margin-top: 3px; }

/* Center pages */
.center-page { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 40px 16px; }
.center-box { max-width: 520px; width: 100%; text-align: center; }
.center-box .card { text-align: left; }
.big-emoji { font-size: 56px; margin-bottom: 16px; }

/* Email mock */
.email { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-align: left; margin-top: 24px; }
.email-head { padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.email-body { padding: 24px 20px; }

/* Cabinet layout */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: #fff; padding: 24px 16px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; }
.sidebar .logo { margin: 0 8px 24px; }
.sidebar .logo-mark { background: var(--lime); color: var(--ink); }
.side-link { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; color: #C9C9D3; font-weight: 600; cursor: pointer; }
.side-link:hover { background: #1F1F25; color: #fff; }
.side-link.active { background: #fff; color: var(--ink); }
.side-bottom { margin-top: auto; font-size: 13px; color: #8A8A96; padding: 12px; }
.main { padding: 32px; min-width: 0; }
.main-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; }
.mobile-tabs { display: none; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 20px 16px 96px; }
  .mobile-tabs { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--ink); z-index: 30; justify-content: space-around; padding: 8px 4px calc(8px + env(safe-area-inset-bottom)); }
  .mobile-tabs a { color: #A9A9B5; font-size: 11px; display: grid; justify-items: center; gap: 2px; font-weight: 600; }
  .mobile-tabs a span { font-size: 20px; }
  .mobile-tabs a.active { color: var(--lime); }
}

.continue { background: var(--ink); color: #fff; border-radius: 24px; padding: 28px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; position: relative; overflow: hidden; margin-bottom: 24px; }
.continue::after { content: ""; position: absolute; right: -60px; bottom: -120px; width: 260px; height: 260px; background: radial-gradient(circle, var(--accent), transparent 70%); }
.continue > * { position: relative; z-index: 1; }
.progress { height: 8px; background: #2A2A31; border-radius: 99px; overflow: hidden; margin-top: 14px; max-width: 420px; }
.progress.light { background: var(--line); }
.progress i { display: block; height: 100%; background: var(--lime); border-radius: 99px; transition: width .4s; }
.progress.light i { background: var(--accent); }

.lesson-row { display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-top: 1px solid var(--line); cursor: pointer; }
.lesson-row:hover { background: var(--bg); }
.lesson-row .st { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 12px; flex-shrink: 0; }
.lesson-row.done .st { background: var(--ok); border-color: var(--ok); color: #fff; }
.lesson-row .dur { margin-left: auto; color: var(--muted); font-size: 14px; white-space: nowrap; }
.locked { position: relative; }
.lock-badge { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 700; background: var(--bg); padding: 4px 10px; border-radius: 99px; }

.product { display: flex; flex-direction: column; gap: 10px; }
.product .p-price { font-size: 26px; font-weight: 800; margin-top: auto; padding-top: 8px; }
.product.owned { opacity: .75; }

.prompt-card { display: flex; flex-direction: column; gap: 10px; }
.prompt-card pre { white-space: pre-wrap; font-family: inherit; background: var(--bg); border-radius: 12px; padding: 12px; font-size: 14px; }
.locked-overlay { filter: blur(5px); pointer-events: none; user-select: none; }
.paywall { position: relative; }
.paywall-cta { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; }
.paywall-cta .card { max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.12); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.chip { padding: 8px 14px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14px; }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Lesson page */
.lesson-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
@media (max-width: 1000px) { .lesson-layout { grid-template-columns: 1fr; } }
.video { aspect-ratio: 16/9; background: var(--ink); border-radius: var(--radius); display: grid; place-items: center; color: #fff; position: relative; overflow: hidden; }
.video::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 30%, rgba(108,77,255,.6), transparent 60%); }
.play { width: 76px; height: 76px; border-radius: 50%; background: var(--lime); color: var(--ink); display: grid; place-items: center; font-size: 26px; z-index: 1; cursor: pointer; }
.lesson-content { margin-top: 24px; }
.lesson-content h3 { margin: 20px 0 8px; }
.lesson-content p, .lesson-content li { color: #33333B; }
.lesson-content ul { padding-left: 20px; }
.task { background: #FBFFE9; border: 1.5px dashed #C8E05A; border-radius: var(--radius); padding: 20px; margin-top: 24px; }
.toc { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; padding: 0; }
.toc-mod { padding: 14px 18px 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.toc a { display: flex; gap: 10px; padding: 9px 18px; font-size: 14px; align-items: center; }
.toc a:hover { background: var(--bg); }
.toc a.current { background: #EFEBFF; font-weight: 700; }
.toc a .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex-shrink: 0; }
.toc a.done .dot { background: var(--ok); }

/* AI chat */
.chat { display: flex; flex-direction: column; height: calc(100vh - 160px); min-height: 460px; padding: 0; overflow: hidden; }
.chat-log { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 80%; padding: 12px 16px; border-radius: 16px; white-space: pre-wrap; }
.msg.bot { background: var(--bg); }
.msg.user { background: var(--accent); color: #fff; margin-left: auto; }
.chat-form { display: flex; gap: 10px; padding: 16px; border-top: 1px solid var(--line); }
.chat-form .input { flex: 1; }
.chat-limit { font-size: 13px; color: var(--muted); padding: 0 16px 12px; }

/* Modal / toast */
.modal-bg { position: fixed; inset: 0; background: rgba(17,17,20,.5); display: none; place-items: center; z-index: 50; padding: 16px; }
.modal-bg.show { display: grid; }
.modal { background: var(--surface); border-radius: 24px; padding: 28px; max-width: 440px; width: 100%; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120px); background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 99px; font-weight: 600; transition: transform .3s; z-index: 60; }
.toast.show { transform: translateX(-50%) translateY(0); }
@media (max-width: 860px) { .toast { bottom: 90px; } }

.hidden { display: none !important; }

/* Text lessons */
.lesson-hero { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 32px; position: relative; overflow: hidden; }
.lesson-hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; background: radial-gradient(circle, var(--accent), transparent 70%); }
.lesson-hero > * { position: relative; z-index: 1; }
.lesson-hero h2 { font-size: 34px; margin: 12px 0 8px; }
.tldr { background: #EFEBFF; border-radius: var(--radius); padding: 20px 24px; margin-top: 20px; }
.tldr ul { padding-left: 20px; margin-top: 8px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
@media (max-width: 620px) { .compare { grid-template-columns: 1fr; } }
.compare > div { border-radius: 14px; padding: 16px; font-size: 15px; }
.compare .bad { background: #FFEDED; }
.compare .good { background: #E9FAEF; }
.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-top: 24px; }
.quiz-q { margin-top: 16px; }
.quiz-opt { display: block; width: 100%; text-align: left; padding: 12px 16px; margin-top: 8px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; }
.quiz-opt:hover { border-color: var(--ink); }
.quiz-opt.right { background: #E9FAEF; border-color: var(--ok); }
.quiz-opt.wrong { background: #FFEDED; border-color: #E5484D; }
.answer { white-space: pre-wrap; background: var(--bg); border-radius: 12px; padding: 14px; margin-top: 12px; }

/* Mentor chat */
.mentor-head { display: flex; gap: 12px; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.msg-time { font-size: 11px; opacity: .6; margin-top: 4px; }
.chat-note { text-align: center; font-size: 13px; color: var(--muted); }
.chat-form textarea { resize: none; }
.badge-count { background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; border-radius: 99px; padding: 2px 8px; }
.threads { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
@media (max-width: 860px) { .threads { grid-template-columns: 1fr; } }
.thread-item { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.thread-item:hover, .thread-item.active { background: var(--bg); }
.thread-item .t-body { flex: 1; min-width: 0; }
.thread-item .t-last { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
