.tm-chapter-six-lesson {
  color: #071833;
  font-size: clamp(18px, 1.65vw, 24px);
  line-height: 1.85;
}

.tm-chapter-six-lesson,
.tm-chapter-six-lesson * {
  box-sizing: border-box;
}

.tm-ch6-chapter-intro,
.tm-ch6-lesson-banner {
  overflow: hidden;
  margin: 0 0 clamp(24px, 4vw, 48px);
  padding: clamp(24px, 4.5vw, 56px);
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: clamp(26px, 4vw, 44px);
  background:
    radial-gradient(circle at 8% 0%, rgba(249, 115, 22, 0.16), transparent 35%),
    radial-gradient(circle at 92% 14%, rgba(217, 70, 239, 0.12), transparent 34%),
    radial-gradient(circle at 55% 110%, rgba(34, 197, 94, 0.14), transparent 36%),
    linear-gradient(135deg, rgba(255, 247, 237, 0.95), rgba(255, 255, 255, 0.98) 58%, rgba(240, 253, 244, 0.86));
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
}

.tm-ch6-chapter-intro span,
.tm-ch6-lesson-banner span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.13);
  color: #b64f04;
  font-size: 0.72em;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tm-ch6-chapter-intro h2,
.tm-ch6-lesson-banner h2 {
  margin: 0;
  color: #082567;
  font-size: clamp(32px, 5.5vw, 64px);
  line-height: 1.07;
  letter-spacing: -0.05em;
}

.tm-ch6-chapter-intro p,
.tm-ch6-lesson-banner p {
  max-width: 880px;
  margin: 22px 0 0;
  color: #516178;
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.65;
}

.tm-ch6-container {
  width: min(100%, 1120px);
  max-width: 100%;
  margin: 0 auto;
}

.tm-chapter-six-lesson .tm-ch6-container > ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: tm-ch6-main;
}

.tm-chapter-six-lesson .tm-ch6-container > ol > li {
  display: grid;
  grid-template-columns: clamp(48px, 5vw, 68px) minmax(0, 1fr);
  gap: clamp(12px, 2vw, 22px);
  align-items: start;
  margin: clamp(18px, 3vw, 34px) 0;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: clamp(20px, 3vw, 32px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94)),
    radial-gradient(circle at 0% 0%, rgba(249, 115, 22, 0.07), transparent 32%),
    radial-gradient(circle at 100% 0%, rgba(34, 197, 94, 0.07), transparent 32%);
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.055);
  counter-increment: tm-ch6-main;
}

.tm-chapter-six-lesson .tm-ch6-container > ol > li::before {
  content: counter(tm-ch6-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(42px, 5vw, 58px);
  height: clamp(42px, 5vw, 58px);
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #22c55e 52%, #d946ef);
  color: #ffffff;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 16px 36px rgba(217, 70, 239, 0.16);
}

.tm-chapter-six-lesson li {
  min-width: 0;
}

.tm-chapter-six-lesson p {
  margin: 0 0 0.8em;
}

.tm-chapter-six-lesson ol,
.tm-chapter-six-lesson ul {
  max-width: 100%;
}

.tm-chapter-six-lesson ol ol,
.tm-chapter-six-lesson ol ul,
.tm-chapter-six-lesson ul ol,
.tm-chapter-six-lesson ul ul {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.5vw, 18px);
  margin: clamp(12px, 1.8vw, 20px) 0 0;
  padding-left: clamp(34px, 4vw, 54px);
}

.tm-chapter-six-lesson ol ol > li::marker,
.tm-chapter-six-lesson ol[type="a"] > li::marker {
  color: #0b54bd;
  font-weight: 950;
  content: "(" counter(list-item, lower-alpha) ") ";
}

.tm-chapter-six-lesson ol ol ol > li::marker {
  color: #0b54bd;
  font-weight: 950;
  content: "(" counter(list-item, lower-roman) ") ";
}

.tm-chapter-six-lesson .tm-ch6-container > ol > li > ol,
.tm-chapter-six-lesson .tm-ch6-container > ol > li > ul,
.tm-chapter-six-lesson .tm-ch6-container > ol > li > p,
.tm-chapter-six-lesson .tm-ch6-container > ol > li > div,
.tm-chapter-six-lesson .tm-ch6-container > ol > li > table,
.tm-chapter-six-lesson .tm-ch6-container > ol > li > mjx-container,
.tm-chapter-six-lesson .tm-ch6-container > ol > li > img,
.tm-chapter-six-lesson .tm-ch6-container > ol > li > .img-container,
.tm-chapter-six-lesson .tm-ch6-container > ol > li > .flex-container {
  grid-column: 2;
}

.tm-chapter-six-lesson ul.sub-questions-vertical {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.8vw, 20px);
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.tm-chapter-six-lesson ul.sub-questions-vertical > li {
  display: grid;
  grid-template-columns: clamp(34px, 4vw, 48px) minmax(0, 1fr);
  gap: clamp(8px, 1vw, 14px);
  align-items: start;
  margin: 0;
  padding: clamp(13px, 1.8vw, 18px) clamp(16px, 2.2vw, 24px);
  border: 1px solid rgba(8, 37, 103, 0.08);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.78);
}

.tm-chapter-six-lesson .sub-q-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(30px, 3.5vw, 42px);
  color: #0b54bd;
  font-weight: 950;
}

.tm-chapter-six-lesson .grid-2,
.tm-chapter-six-lesson .grid-3,
.tm-chapter-six-lesson .grid-4 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(12px, 1.8vw, 18px);
  margin: clamp(14px, 2vw, 22px) 0;
}

.tm-chapter-six-lesson .grid-2 > div,
.tm-chapter-six-lesson .grid-3 > div,
.tm-chapter-six-lesson .grid-4 > div {
  min-width: 0;
  padding: clamp(10px, 1.5vw, 16px) clamp(12px, 1.8vw, 18px);
  border: 1px solid rgba(8, 37, 103, 0.08);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.78);
}

.tm-chapter-six-lesson .question,
.tm-chapter-six-lesson .question-block {
  display: grid;
  grid-template-columns: clamp(48px, 5vw, 68px) minmax(0, 1fr);
  gap: clamp(12px, 2vw, 22px);
  align-items: start;
  margin: clamp(18px, 3vw, 32px) 0;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid rgba(20, 184, 166, 0.12);
  border-radius: clamp(20px, 3vw, 32px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
    radial-gradient(circle at 0% 0%, rgba(20, 184, 166, 0.09), transparent 32%),
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.08), transparent 32%);
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.06);
}

.tm-chapter-six-lesson .q-number,
.tm-chapter-six-lesson .question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(42px, 5vw, 58px);
  height: clamp(42px, 5vw, 58px);
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #22c55e 52%, #d946ef);
  color: #ffffff;
  font-size: clamp(20px, 2vw, 28px);
  color: #0b54bd;
  color: #ffffff;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 16px 36px rgba(217, 70, 239, 0.16);
}

.tm-chapter-six-lesson .q-content,
.tm-chapter-six-lesson .question-content {
  min-width: 0;
}

.tm-chapter-six-lesson .question-block .sub-questions-vertical {
  grid-column: auto;
}

.tm-chapter-six-lesson .flex-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.78fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: center;
  margin: clamp(18px, 2.8vw, 30px) 0;
}

.tm-chapter-six-lesson .flex-container > div,
.tm-chapter-six-lesson .flex-container > img,
.tm-chapter-six-lesson .flex-text,
.tm-chapter-six-lesson .flex-image {
  min-width: 0;
}

.tm-chapter-six-lesson .flex-image {
  width: 100%;
}

.tm-chapter-six-lesson .inline-space {
  display: inline-block;
  min-width: 0.65em;
}

.tm-chapter-six-lesson img {
  display: block;
  width: auto;
  max-width: min(100%, 620px);
  height: auto;
  margin: clamp(12px, 2vw, 22px) auto;
  padding: clamp(8px, 1.2vw, 14px);
  border: 1px solid rgba(8, 37, 103, 0.1);
  border-radius: clamp(16px, 2.4vw, 26px);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.07);
}

.tm-chapter-six-lesson .img-container {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.tm-chapter-six-lesson .img-container img {
  max-width: min(100%, 760px);
}

.tm-chapter-six-lesson table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: clamp(14px, 2.4vw, 24px) 0;
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(8, 37, 103, 0.12);
}

.tm-chapter-six-lesson .math-table,
.tm-chapter-six-lesson .point-table,
.tm-chapter-six-lesson .blank-table {
  font-size: clamp(16px, 1.45vw, 21px);
}

.tm-chapter-six-lesson .math-table td,
.tm-chapter-six-lesson .point-table td,
.tm-chapter-six-lesson .blank-table td {
  min-width: clamp(84px, 11vw, 140px);
  text-align: center;
}

.tm-chapter-six-lesson th,
.tm-chapter-six-lesson td {
  padding: 12px 14px;
  border: 1px solid rgba(8, 37, 103, 0.16);
  vertical-align: middle;
}

.tm-chapter-six-lesson th {
  background: rgba(219, 234, 254, 0.78);
  color: #082567;
  font-weight: 850;
}

.tm-chapter-six-lesson mjx-container {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-block: 0.08em;
}

@media (max-width: 860px) {
  .tm-chapter-six-lesson .flex-container {
    grid-template-columns: 1fr;
  }

  .tm-chapter-six-lesson img {
    max-width: 100%;
  }
}

@media (max-width: 620px) {
  .tm-chapter-six-lesson {
    font-size: 18px;
  }

  .tm-chapter-six-lesson .tm-ch6-container > ol {
    padding-left: 0;
  }

  .tm-chapter-six-lesson .tm-ch6-container > ol > li {
    grid-template-columns: 1fr;
  }

  .tm-chapter-six-lesson .question,
  .tm-chapter-six-lesson .question-block {
    grid-template-columns: 1fr;
  }

  .tm-chapter-six-lesson .tm-ch6-container > ol > li > ol,
  .tm-chapter-six-lesson .tm-ch6-container > ol > li > ul,
  .tm-chapter-six-lesson .tm-ch6-container > ol > li > p,
  .tm-chapter-six-lesson .tm-ch6-container > ol > li > div,
  .tm-chapter-six-lesson .tm-ch6-container > ol > li > table,
  .tm-chapter-six-lesson .tm-ch6-container > ol > li > mjx-container,
  .tm-chapter-six-lesson .tm-ch6-container > ol > li > img,
  .tm-chapter-six-lesson .tm-ch6-container > ol > li > .img-container,
  .tm-chapter-six-lesson .tm-ch6-container > ol > li > .flex-container {
    grid-column: 1;
  }
}
