.mindlect-lesson {
  max-width: 900px;
  color: #172033;
  font-size: 17px;
  line-height: 1.72;
}

.mindlect-lesson h2 {
  margin: 38px 0 14px;
  color: #10284a;
  font-size: 30px;
  letter-spacing: -.025em;
}

.mindlect-lesson h3 {
  margin: 28px 0 10px;
  color: #10284a;
  font-size: 21px;
}

.mindlect-lesson p { margin: 0 0 18px; }
.mindlect-lesson ul,
.mindlect-lesson ol { margin: 0 0 22px; padding-left: 24px; }
.mindlect-lesson li { margin: 7px 0; }

.mindlect-lesson .ml-key {
  margin: 24px 0;
  padding: 22px 24px;
  border-left: 4px solid #410ff8;
  border-radius: 0 12px 12px 0;
  color: #10284a !important;
  background: #f4f1ff;
}

.mindlect-lesson .ml-safety {
  margin: 24px 0;
  padding: 22px 24px;
  border-radius: 14px;
  color: #fff;
  background: #10284a;
}

.mindlect-lesson .ml-task {
  margin: 26px 0;
  padding: 24px;
  border: 0;
  border-radius: 16px;
  color: #172033;
  background: #f5f7fb;
  box-shadow: 0 14px 32px rgba(16, 40, 74, .06);
}

.mindlect-lesson .ml-task,
.mindlect-lesson .ml-task h3,
.mindlect-lesson .ml-task p,
.mindlect-lesson .ml-task li { color: #172033 !important; }
.mindlect-lesson .ml-task h3 { margin-top: 0; }
.mindlect-lesson .ml-task p:last-child { margin-bottom: 0; }
.mindlect-lesson .ml-key strong { color: #10284a !important; }

.mindlect-lesson .ml-check {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #410ff8 !important;
  background: #ede8ff;
  font-size: 13px;
  font-weight: 800;
}

.mindlect-lesson code {
  padding: 2px 6px;
  border-radius: 5px;
  background: #eef0f5;
}

.mindlect-lesson pre {
  overflow: auto;
  padding: 20px;
  border-radius: 14px;
  color: #fff;
  background: #0d1424;
  line-height: 1.55;
}

.mindlect-lesson pre code {
  display: block;
  padding: 0;
  color: #e8eefb !important;
  background: transparent !important;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre;
}

.mindlect-lesson .ml-visual-hero {
  margin: 24px 0 30px;
  overflow: hidden;
  border-radius: 18px;
  background: #10284a;
  box-shadow: 0 22px 48px rgba(16, 40, 74, .16);
}

.mindlect-lesson .ml-visual-hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

.mindlect-lesson .ml-visual-hero figcaption {
  padding: 13px 18px;
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
}

.mindlect-lesson .ml-system-map {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 10px;
  margin: 26px 0;
}

.mindlect-lesson .ml-system-step {
  display: flex;
  min-height: 138px;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  border-radius: 16px;
  background: #f5f7fb;
  box-shadow: 0 12px 28px rgba(16, 40, 74, .05);
}

.mindlect-lesson .ml-system-step span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  margin-bottom: 13px;
  border-radius: 50%;
  color: #fff;
  background: #410ff8;
  font-size: 12px;
  font-weight: 800;
}

.mindlect-lesson .ml-system-step small {
  color: #746e82 !important;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.mindlect-lesson .ml-system-step strong {
  margin-top: 6px;
  color: #10284a !important;
  font-size: 15px;
  line-height: 1.35;
}

.mindlect-lesson .ml-system-arrow {
  display: flex;
  align-items: center;
  color: #410ff8;
  font-size: 25px;
  font-weight: 800;
}

.mindlect-lesson .ml-echo-map {
  display: grid;
  grid-template-columns: 150px 1fr 130px;
  align-items: center;
  gap: 18px;
  margin: 26px 0;
  padding: 24px;
  border-radius: 18px;
  color: #fff;
  background: #10284a;
}

.mindlect-lesson .ml-device,
.mindlect-lesson .ml-target {
  display: flex;
  min-height: 100px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, .1);
  font-weight: 800;
  text-align: center;
}

.mindlect-lesson .ml-wave { display: grid; gap: 12px; text-align: center; }
.mindlect-lesson .ml-wave span { display: block; padding: 8px; border-radius: 999px; background: #410ff8; font-size: 12px; font-weight: 750; }
.mindlect-lesson .ml-wave span:last-child { color: #10284a; background: #fff; }

.mindlect-lesson .ml-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 22px 0 28px;
}

.mindlect-lesson .ml-card {
  padding: 20px;
  border-radius: 15px;
  background: #f5f7fb;
  box-shadow: 0 12px 28px rgba(16, 40, 74, .05);
}

.mindlect-lesson .ml-card small { display: block; color: #410ff8 !important; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.mindlect-lesson .ml-card strong { display: block; margin-top: 6px; color: #10284a !important; font-size: 16px; }
.mindlect-lesson .ml-card p { margin: 8px 0 0; color: #5e6879 !important; font-size: 13px; line-height: 1.55; }

.mindlect-lesson .ml-build-order {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0 28px;
  counter-reset: build;
}

.mindlect-lesson .ml-build-order div {
  min-height: 120px;
  padding: 18px;
  border-radius: 15px;
  background: #f5f7fb;
  counter-increment: build;
}

.mindlect-lesson .ml-build-order div::before {
  display: flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border-radius: 50%;
  color: #fff;
  background: #410ff8;
  content: counter(build);
  font-size: 11px;
  font-weight: 800;
}

.mindlect-lesson .ml-build-order strong { display: block; color: #10284a !important; font-size: 14px; line-height: 1.4; }
.mindlect-lesson .ml-code-flow { display: flex; width: 100%; align-items: center; gap: 8px; margin: 22px 0 26px; padding: 4px 0 10px; }
.mindlect-lesson .ml-code-flow span { width: auto !important; min-width: 0; flex: 1 1 0; padding: 14px 10px; border-radius: 999px; color: #10284a !important; background: #f1f3f8; font-size: 12px; font-weight: 800; text-align: center; }
.mindlect-lesson .ml-code-flow b { flex: 0 0 auto; color: #410ff8; font-size: 21px; }

.mindlect-lesson .ml-trouble-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 22px 0 28px; }
.mindlect-lesson .ml-trouble { padding: 20px; border-radius: 15px; background: #f5f7fb; }
.mindlect-lesson .ml-trouble strong { display: block; color: #10284a !important; font-size: 14px; }
.mindlect-lesson .ml-trouble span { display: block; margin-top: 7px; color: #5e6879 !important; font-size: 12px; line-height: 1.55; }

.mindlect-lesson .ml-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.mindlect-lesson .ml-button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0 18px; border: 1px solid #410ff8; border-radius: 8px; color: #410ff8; font-weight: 760; text-decoration: none; }
.mindlect-lesson .ml-button--primary { color: #fff; background: #410ff8; }

@media (max-width: 720px) {
  .mindlect-lesson { font-size: 16px; }
  .mindlect-lesson h2 { font-size: 26px; }
  .mindlect-lesson .ml-system-map { grid-template-columns: 1fr; }
  .mindlect-lesson .ml-system-arrow { justify-content: center; transform: rotate(90deg); }
  .mindlect-lesson .ml-echo-map { grid-template-columns: 1fr; }
  .mindlect-lesson .ml-card-grid,
  .mindlect-lesson .ml-trouble-grid { grid-template-columns: 1fr; }
  .mindlect-lesson .ml-build-order { grid-template-columns: repeat(2, 1fr); }
  .mindlect-lesson .ml-code-flow { overflow-x: auto; }
  .mindlect-lesson .ml-code-flow span { min-width: 116px; flex: 0 0 116px; }
  .mindlect-lesson .ml-actions,
  .mindlect-lesson .ml-button { width: 100%; }
}

@media (max-width: 440px) {
  .mindlect-lesson .ml-build-order { grid-template-columns: 1fr; }
  .mindlect-lesson .ml-visual-hero img { aspect-ratio: 4 / 3; }
}
