/* ===== ИИ-агенты в продакшен-разработке — стили ===== */
:root {
  --bg: #0c0e14;
  --bg-soft: #12151f;
  --card: #171b28;
  --card-2: #1d2233;
  --line: #262c40;
  --text: #e8eaf2;
  --muted: #9aa1b5;
  --accent: #8b7bff;
  --accent-2: #6ee7c8;
  --warn: #ffc46b;
  --danger: #ff7d7d;
  --radius: 16px;
  --maxw: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ===== Шапка ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 14, 20, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 24px;
  min-height: 60px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 17px; letter-spacing: .2px;
  color: var(--text);
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: inline-flex; align-items: center; justify-content: center;
  color: #0c0e14; font-size: 15px; font-weight: 900;
}
.nav { margin-left: auto; display: flex; gap: 18px; align-items: center; }
.nav a { color: var(--muted); font-size: 15px; font-weight: 600; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav .btn { margin-left: 6px; }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer;
  border-radius: 12px; padding: 12px 22px;
  font-size: 16px; font-weight: 700;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, #8b7bff, #6ee7c8);
  color: #0c0e14;
  box-shadow: 0 8px 24px rgba(139, 123, 255, .25);
}
.btn-primary:hover { box-shadow: 0 10px 30px rgba(139, 123, 255, .4); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); }
.btn-sm { padding: 8px 16px; font-size: 14px; border-radius: 10px; }

/* ===== Герой ===== */
.hero { position: relative; overflow: hidden; padding: 84px 0 64px; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 15% 0%, rgba(139, 123, 255, .18), transparent 70%),
    radial-gradient(500px 260px at 85% 10%, rgba(110, 231, 200, .12), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 700;
  color: var(--accent-2);
  background: rgba(110, 231, 200, .08);
  border: 1px solid rgba(110, 231, 200, .25);
  border-radius: 999px; padding: 6px 14px;
}
.badge.violet { color: #b9aeff; background: rgba(139,123,255,.1); border-color: rgba(139,123,255,.3); }
.badge.plain { color: var(--muted); background: var(--card); border-color: var(--line); }
h1 {
  font-size: clamp(34px, 5.4vw, 56px);
  line-height: 1.12; font-weight: 900; letter-spacing: -.5px;
  max-width: 820px;
}
h1 .grad {
  background: linear-gradient(90deg, #b9aeff, #6ee7c8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  margin-top: 20px; max-width: 680px;
  color: var(--muted); font-size: 19px;
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 30px; }
.hero-meta .item { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 15.5px; }
.hero-meta .item b { color: var(--text); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-note { margin-top: 14px; color: var(--muted); font-size: 14px; }

/* ===== Секции ===== */
.section { padding: 72px 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--bg-soft); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.kicker {
  color: var(--accent); font-weight: 800; font-size: 13.5px;
  letter-spacing: 2.5px; text-transform: uppercase; margin-bottom: 12px;
}
h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; letter-spacing: -.3px; line-height: 1.2; }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 17.5px; }

/* ===== Сетка карточек ===== */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
}
.card h3 { font-size: 19px; font-weight: 800; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15.5px; }
.card .num {
  display: inline-flex; width: 34px; height: 34px; border-radius: 10px;
  align-items: center; justify-content: center;
  background: rgba(139, 123, 255, .14); color: #b9aeff;
  font-weight: 800; font-size: 15px; margin-bottom: 14px;
}
.card ul { margin-left: 18px; color: var(--muted); font-size: 15.5px; }
.card li { margin: 6px 0; }

/* ===== Программа (аккордеон) ===== */
.day {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 16px;
}
.day-head {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 24px 26px; cursor: pointer; user-select: none;
}
.day-head:hover { background: var(--card-2); }
.day-date {
  flex: none; width: 74px; text-align: center;
  border-right: 1px solid var(--line); padding-right: 16px;
}
.day-date .d { font-size: 26px; font-weight: 900; color: var(--accent-2); line-height: 1.1; }
.day-date .m { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.day-title { flex: 1; }
.day-title h3 { font-size: 20px; font-weight: 800; }
.day-title .tag { color: var(--muted); font-size: 14.5px; margin-top: 4px; display: block; }
.day-arrow {
  flex: none; margin-top: 6px; color: var(--muted);
  transition: transform .2s ease; font-size: 13px;
}
.day.open .day-arrow { transform: rotate(180deg); }
.day-body { display: none; padding: 0 26px 24px 118px; }
.day.open .day-body { display: block; }
.day-body ul { margin-left: 18px; color: var(--muted); font-size: 15.5px; }
.day-body li { margin: 7px 0; }
.day-body li b { color: var(--text); }
@media (max-width: 640px) {
  .day-body { padding-left: 26px; }
  .day-date { width: auto; border: 0; padding: 0; display: flex; gap: 6px; align-items: baseline; }
}

/* ===== Формат ===== */
.fmt { display: flex; gap: 16px; align-items: flex-start; }
.fmt .ico {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(139, 123, 255, .14); font-size: 20px;
}

/* ===== FAQ ===== */
.faq-item {
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); margin-bottom: 12px; overflow: hidden;
}
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; color: var(--text);
  font-size: 17px; font-weight: 700; padding: 20px 24px; cursor: pointer;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq-q:hover { color: var(--accent-2); }
.faq-q .pm { color: var(--accent); font-size: 20px; flex: none; }
.faq-a { display: none; padding: 0 24px 20px; color: var(--muted); font-size: 15.5px; }
.faq-item.open .faq-a { display: block; }

/* ===== CTA-баннер ===== */
.cta-banner {
  border-radius: 22px; padding: 46px 40px;
  background:
    radial-gradient(500px 240px at 10% 0%, rgba(139,123,255,.25), transparent 70%),
    radial-gradient(400px 200px at 90% 100%, rgba(110,231,200,.16), transparent 70%),
    var(--card);
  border: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between;
}
.cta-banner h2 { max-width: 560px; }
.cta-banner p { color: var(--muted); margin-top: 10px; max-width: 560px; }

/* ===== Подвал ===== */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0 44px; color: var(--muted); font-size: 14.5px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; }

/* ===== Кабинет: список уроков ===== */
.progress-top {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 24px; margin: 34px 0 28px;
}
.progress-top .bar { flex: 1; min-width: 220px; height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress-top .bar i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s ease; }
.progress-top .lbl { font-size: 15px; color: var(--muted); }
.progress-top .lbl b { color: var(--text); }

.lesson-row {
  display: flex; gap: 20px; align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 26px; margin-bottom: 14px;
  transition: border-color .15s ease;
}
.lesson-row:hover { border-color: var(--accent); }
.lesson-row .idx {
  flex: none; width: 52px; height: 52px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900;
  background: rgba(139,123,255,.14); color: #b9aeff;
}
.lesson-row.done .idx { background: rgba(110,231,200,.15); color: var(--accent-2); }
.lesson-row .info { flex: 1; min-width: 200px; }
.lesson-row .info h3 { font-size: 18.5px; font-weight: 800; }
.lesson-row .info .meta { color: var(--muted); font-size: 14.5px; margin-top: 5px; }
.lesson-row .go { flex: none; }

/* ===== Страница урока ===== */
.lesson-top { padding: 44px 0 8px; }
.crumbs { font-size: 14.5px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent-2); }
.lesson-top h1 { font-size: clamp(28px, 4vw, 42px); }
.lesson-top .lmeta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.lesson-body { max-width: 840px; margin: 0 auto; padding: 30px 0 80px; }
.lesson-body h2 {
  font-size: 25px; margin: 44px 0 14px; padding-top: 10px;
}
.lesson-body h2:first-child { margin-top: 12px; }
.lesson-body p { margin: 14px 0; color: #c7ccdd; }
.lesson-body ul, .lesson-body ol { margin: 14px 0 14px 24px; color: #c7ccdd; }
.lesson-body li { margin: 7px 0; }
.lesson-body li::marker { color: var(--accent); }
.lesson-body strong { color: var(--text); }
.lesson-body a { color: var(--accent-2); }

.callout {
  border-radius: 14px; padding: 18px 22px; margin: 22px 0;
  border: 1px solid rgba(139,123,255,.35);
  background: rgba(139,123,255,.08);
  font-size: 16px;
}
.callout .ttl { font-weight: 800; margin-bottom: 6px; color: #b9aeff; }
.callout.warn { border-color: rgba(255,196,107,.35); background: rgba(255,196,107,.07); }
.callout.warn .ttl { color: var(--warn); }
.callout.tip { border-color: rgba(110,231,200,.35); background: rgba(110,231,200,.07); }
.callout.tip .ttl { color: var(--accent-2); }

pre.code {
  background: #0a0c12; border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 20px; overflow-x: auto;
  font-size: 14px; line-height: 1.6; margin: 18px 0;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, Menlo, monospace;
  color: #d6dcf0;
}
pre.code .cm { color: #6b7390; }
pre.code .kw { color: #b9aeff; }
pre.code .str { color: #6ee7c8; }

table.tbl { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; }
table.tbl th { text-align: left; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); color: #c7ccdd; }

/* ===== Тест ===== */
.quiz {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px; margin-top: 46px;
}
.quiz h2 { font-size: 23px; margin-bottom: 6px; }
.quiz .hint { color: var(--muted); font-size: 14.5px; margin-bottom: 10px; }
.q { margin-top: 26px; }
.q .qt { font-weight: 700; font-size: 17px; margin-bottom: 12px; }
.q .opt {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 16px; margin-bottom: 9px; cursor: pointer;
  font-size: 15.5px; color: #c7ccdd; background: var(--bg-soft);
  transition: border-color .12s ease;
}
.q .opt:hover { border-color: var(--accent); }
.q .opt input { margin-top: 3px; accent-color: var(--accent); }
.q .opt.correct { border-color: var(--accent-2); background: rgba(110,231,200,.08); }
.q .opt.wrong { border-color: var(--danger); background: rgba(255,125,125,.06); }
.q .expl {
  display: none; margin-top: 10px; font-size: 14.5px; color: var(--muted);
  border-left: 3px solid var(--accent); padding-left: 14px;
}
.q.checked .expl { display: block; }
.quiz-actions { margin-top: 28px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.quiz-result { font-weight: 800; font-size: 17px; }

/* ===== Практика / чек-лист ===== */
.practice {
  border: 1px dashed rgba(139,123,255,.5);
  background: rgba(139,123,255,.06);
  border-radius: var(--radius); padding: 26px 28px; margin-top: 40px;
}
.practice h2 { font-size: 22px; }
.practice .task { color: #c7ccdd; margin-top: 10px; }
.checklist { list-style: none; margin: 16px 0 0 !important; }
.checklist li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0 10px 0; border-bottom: 1px solid rgba(38,44,64,.6);
  cursor: pointer; color: #c7ccdd;
}
.checklist li:last-child { border-bottom: 0; }
.checklist input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--accent-2); flex: none; }
.checklist li.done { color: var(--muted); text-decoration: line-through; }

.lesson-footer-nav {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--line);
}

/* ===== Финал / сертификат ===== */
.final-box {
  text-align: center; padding: 60px 24px;
}
.final-box .big { font-size: 52px; }
.confetti { font-size: 40px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 54px 0 44px; }
  .section { padding: 52px 0; }
  .cta-banner { padding: 34px 24px; }
}
