.tm-chapter-four-lesson {
  --ch4-blue: #052b52;
  --ch4-cyan: #19d3d1;
  --ch4-green: #20c76a;
  --ch4-violet: #6557ff;
  --ch4-soft: #f3fffb;
}
.tm-ch4-lesson-banner {
  position: relative;
  overflow: hidden;
  margin: 0 0 2rem;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border: 1px solid rgba(25,211,209,.24);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 18%, rgba(25,211,209,.22), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(101,87,255,.16), transparent 32%),
    linear-gradient(135deg, #fff, #f3fffb 48%, #f5f6ff);
  box-shadow: 0 22px 55px rgba(25, 211, 209, .10);
}
.tm-ch4-lesson-banner span {
  display: inline-flex;
  margin-bottom: .75rem;
  padding: .42rem .78rem;
  border-radius: 999px;
  background: rgba(25,211,209,.16);
  color: #057477;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .78rem;
}
.tm-ch4-lesson-banner h2 {
  margin: 0 0 .55rem !important;
  color: var(--ch4-blue);
  font-size: clamp(2rem, 4.4vw, 3.5rem) !important;
  line-height: 1.04 !important;
}
.tm-ch4-lesson-banner p { max-width: 820px; margin: 0; color: #61708a; line-height: 1.65; }
.tm-chapter-four-lesson blockquote {
  margin: 1.2rem 0 1.6rem;
  padding: clamp(1rem, 3vw, 1.6rem);
  border-left: 5px solid var(--ch4-cyan);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(25,211,209,.08), rgba(101,87,255,.06));
  color: #10233f;
}
.tm-chapter-four-lesson .tm-lesson-figure,
.tm-chapter-four-lesson .tm-pdf-page-card {
  max-width: 100%;
  box-sizing: border-box;
  margin: 1.15rem auto 1.65rem;
  padding: clamp(.75rem, 2vw, 1.1rem);
  border: 1px solid rgba(5,43,82,.12);
  border-radius: 24px;
  background: linear-gradient(180deg, #fff, #f8fffd);
  box-shadow: 0 18px 42px rgba(5, 43, 82, .08);
  text-align: center;
  overflow: hidden;
}
.tm-chapter-four-lesson .tm-lesson-figure {
  display: block;
  width: fit-content !important;
  max-width: 100%;
  margin-left: 0 !important;
  margin-right: auto !important;
}
.tm-chapter-four-lesson .tm-pdf-page-card {
  width: min(100%, 760px);
}
.tm-chapter-four-lesson .tm-lesson-figure img {
  display: block;
  width: auto !important;
  max-width: min(100%, 580px) !important;
  max-height: min(52vh, 420px);
  height: auto !important;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 16px;
}
.tm-chapter-four-lesson .tm-pdf-page-card img {
  display: block;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 16px;
}
.tm-chapter-four-lesson .tm-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  box-sizing: border-box;
  margin: 1rem 0;
  padding-bottom: .4rem;
  scrollbar-width: thin;
}
.tm-chapter-four-lesson .tm-table-scroll table {
  width: 100%;
  max-width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
  margin: 0;
}
.tm-chapter-four-lesson .tm-table-scroll th,
.tm-chapter-four-lesson .tm-table-scroll td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}
.tm-chapter-four-lesson .tm-table-scroll .katex {
  font-size: clamp(.88rem, 1.6vw, 1rem);
}
.tm-chapter-four-lesson .math-wrap,
.tm-chapter-four-lesson .tm-table-scroll { scrollbar-width: thin; }
.tm-chapter-four-lesson .math-wrap::-webkit-scrollbar,
.tm-chapter-four-lesson .tm-table-scroll::-webkit-scrollbar { height: 8px; width: 0; }
.tm-chapter-four-lesson .tm-pdf-page-grid { display: grid; gap: 1.5rem; }
.tm-chapter-four-lesson .tm-pdf-page-card span { display: inline-flex; margin-bottom: .75rem; color: #057477; font-weight: 900; }
@media (max-width: 680px) {
  .tm-ch4-lesson-banner { border-radius: 22px; }
  .tm-chapter-four-lesson .tm-lesson-figure,
  .tm-chapter-four-lesson .tm-pdf-page-card { border-radius: 20px; }
}
