.lesson-hero {
  display: grid;
  grid-template-columns:
    minmax(0, 1.35fr)
    minmax(220px, 0.65fr);
  min-height: 240px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid #dce2e8;
  border-radius: 18px;
  background:
    linear-gradient(
      135deg,
      #f5f9ff,
      #e7f0f7
    );
}

.lesson-hero-content {
  padding: 24px 28px;
}

.lesson-hero-content h2 {
  margin: 5px 0 10px;
  color: #172039;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.lesson-hero-content > p {
  max-width: 680px;
  margin: 0;
  color: #4b586b;
  line-height: 1.45;
}

.lesson-result-preview {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  max-width: 680px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #dce5ef;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.lesson-result-preview strong {
  color: #1a4eb7;
  font-size: 13px;
}

.lesson-result-preview span {
  color: #334155;
  font-size: 13px;
  line-height: 1.4;
}

.lesson-hero-visual {
  display: flex;
  min-height: 240px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: #ffffff;
  background:
    linear-gradient(
      145deg,
      #7898ae,
      #334f63
    );
}

.lesson-hero-visual span {
  align-self: flex-start;
  margin-bottom: auto;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.lesson-hero-visual strong {
  font-size: 22px;
  line-height: 1.2;
}

.lesson-section {
  margin-bottom: 14px;
  padding: 20px;
  border: 1px solid #dfe3e7;
  border-radius: 16px;
  background: #ffffff;
}

.lesson-section-heading {
  margin-bottom: 14px;
}

.lesson-section-heading h3 {
  margin: 3px 0 6px;
  color: #18223a;
  font-size: 21px;
  line-height: 1.2;
}

.lesson-section-heading > p:not(.eyebrow) {
  max-width: 820px;
  margin: 0;
  color: #5e6878;
  line-height: 1.45;
}

.lesson-topics {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.lesson-topics article {
  min-height: 92px;
  padding: 14px;
  border: 1px solid #e4e8ec;
  border-radius: 12px;
  background: #f8fafc;
}

.lesson-topics article span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  border-radius: 50%;
  color: #2350b5;
  background: #e7eeff;
  font-size: 11px;
  font-weight: 800;
}

.lesson-topics article p {
  margin: 0;
  color: #263247;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.webinar-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
  background: #f1f7fb;
}

.webinar-placeholder {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background:
    linear-gradient(
      145deg,
      #87a8bd,
      #45657c
    );
}

.webinar-placeholder span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 50%;
  color: #21465f;
  background: #ffffff;
}

.notes-section {
  background: #fff9eb;
}

.notes-section textarea {
  min-height: 110px;
  background: #fffdf7;
}

#notes-save-status {
  display: block;
  margin-top: 6px;
  color: #7b6c47;
}

.practice-section {
  background: #fff7f2;
}

.ai-result-section {
  background: #f1f7ff;
}

#competitor-ai-result,
#competitor-summary-result {
  min-height: 150px;
}

.practice-section .primary-button,
.ai-result-section .primary-button {
  margin-top: 12px;
}

.competitor-matrix-section {
  background: #fffaf5;
}

.competitor-empty {
  margin-bottom: 12px;
  padding: 18px;
  border: 1px dashed #cfd6de;
  border-radius: 12px;
  color: #697386;
  text-align: center;
}

.competitor-card {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid #dde2e7;
  border-radius: 14px;
  background: #ffffff;
}

.competitor-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.competitor-card-header > div {
  min-width: 0;
}

.competitor-card-header h4 {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  color: #172039;
  font-size: 18px;
}

.competitor-main-fields,
.competitor-analysis-grid,
.competitor-summary-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.competitor-analysis-grid {
  margin-top: 12px;
}

.competitor-card input,
.competitor-card textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.competitor-card textarea,
.competitor-summary-grid textarea {
  min-height: 88px;
}

.competitor-link {
  display: inline-block;
  max-width: 100%;
  margin-top: 6px;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: #2457c5;
  font-size: 12px;
  line-height: 1.35;
  text-decoration: underline;
}

.review-sources {
  grid-column: 1 / -1;
}

.secondary-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid #cfd6df;
  border-radius: 9px;
  color: #273449;
  background: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.secondary-button:hover {
  border-color: #99a7b8;
  background: #f7f9fb;
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.summary-heading {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e1e4e8;
}

.summary-tool {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid #dce4ec;
  border-radius: 12px;
  background: #f4f7fb;
}

.summary-tool-actions,
.lesson-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.summary-tool-actions {
  margin: 0 0 12px;
}

.lesson-finish {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto;
  gap: 20px;
  align-items: center;
  background: #f3f5f7;
}

.lesson-finish.is-completed {
  border-color: #ccdfbd;
  background: #f1f8ec;
}

.lesson-finish h3 {
  margin: 4px 0 6px;
  color: #172039;
  font-size: 22px;
}

.lesson-finish p {
  max-width: 720px;
  margin: 0;
  color: #5a6472;
  line-height: 1.45;
}

.lesson-finish-actions {
  display: grid;
  min-width: 250px;
  gap: 8px;
}

.upload-confirmation {
  display: flex;
  gap: 8px;
  color: #4d5868;
  font-size: 13px;
}

.print-document {
  display: none;
}

@media (max-width: 900px) {
  .lesson-topics {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .lesson-hero {
    grid-template-columns: 1fr;
  }

  .lesson-hero-visual {
    min-height: 150px;
  }
}

@media (max-width: 640px) {
  .lesson-hero-content,
  .lesson-section {
    padding: 16px;
  }

  .lesson-hero-content h2 {
    font-size: 32px;
  }

  .lesson-result-preview,
  .webinar-section,
  .lesson-finish,
  .competitor-main-fields,
  .competitor-analysis-grid,
  .competitor-summary-grid {
    grid-template-columns: 1fr;
  }

  .lesson-topics {
    grid-template-columns: 1fr 1fr;
  }

  .lesson-finish-actions {
    min-width: 0;
  }
}
