/*
  CM Academy Lesson Content Style System
  Scope: lesson content only, so homepage/header/footer styles stay safe.
  Use these classes inside CM-Academy-Data lesson content files.
*/

.cm-lesson-main {
  overflow: hidden;
}

.cm-lesson-main > .lesson-heading,
.cm-lesson-content .lesson-heading {
  background: linear-gradient(135deg, #d72f4e 0%, #a02149 42%, #630db3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #a02149;
}

.cm-lesson-content {
  --lesson-red: #d72f4e;
  --lesson-red-dark: #821b3b;
  --lesson-blue: #1a73e8;
  --lesson-blue-dark: #073868;
  --lesson-orange: #de8212;
  --lesson-purple: #630db3;
  --lesson-green: #2b870f;
  --lesson-text: #3d3640;
  --lesson-muted: #6f6470;
  --lesson-border: rgba(160, 33, 73, 0.14);
  --lesson-card: rgba(255, 255, 255, 0.86);
  color: var(--lesson-text);
  font-size: clamp(0.96rem, 0.35vw + 0.88rem, 1.04rem);
  line-height: 1.75;
}

.cm-lesson-content *,
.cm-lesson-content *::before,
.cm-lesson-content *::after {
  box-sizing: border-box;
}

.cm-lesson-content > *:first-child {
  margin-top: 0;
}

.cm-lesson-content p {
  margin: 0 0 1rem;
  color: var(--lesson-text);
}

.cm-lesson-content :is(h1, h2, h3, h4, h5, h6) {
  margin: 0 0 0.85rem;
  line-height: 1.25;
  color: var(--lesson-red-dark);
  font-weight: 650;
  letter-spacing: -0.015em;
}

.cm-lesson-content h1,
.cm-lesson-content .font-1 { font-size: clamp(1.65rem, 2.4vw, 2.25rem); }
.cm-lesson-content h2,
.cm-lesson-content .font-2 { font-size: clamp(1.35rem, 1.6vw, 1.7rem); }
.cm-lesson-content h3,
.cm-lesson-content .font-3 { font-size: clamp(1.12rem, 1.1vw, 1.34rem); }
.cm-lesson-content h4,
.cm-lesson-content .font-4 { font-size: clamp(1.02rem, 0.8vw, 1.16rem); }
.cm-lesson-content h5,
.cm-lesson-content h6,
.cm-lesson-content .font-5 { font-size: 1rem; }

.cm-lesson-content .weight-1 { font-weight: 700; }
.cm-lesson-content .weight-2 { font-weight: 600; }
.cm-lesson-content .weight-3 { font-weight: 500; }
.cm-lesson-content .weight-4 { font-weight: 400; }
.cm-lesson-content .weight-5 { font-weight: 300; }

.cm-lesson-content strong {
  font-weight: 650;
  color: #211824;
}

/* Color utility classes - scoped only to lessons */
.cm-lesson-content .red { color: var(--lesson-red); }
.cm-lesson-content .blue { color: var(--lesson-blue-dark); }
.cm-lesson-content .orange { color: var(--lesson-orange); }
.cm-lesson-content .purple { color: var(--lesson-purple); }
.cm-lesson-content .light-red { color: #e95263; }
.cm-lesson-content .white { color: #fff; }
.cm-lesson-content .black { color: #2f3031; }
.cm-lesson-content .bg-white { background: #fff; }
.cm-lesson-content .bg-red { background: var(--lesson-red); }
.cm-lesson-content .bg-blue { background: var(--lesson-blue); }
.cm-lesson-content .bg-orange { background: #f99720; }
.cm-lesson-content .bg-purple { background: var(--lesson-purple); }
.cm-lesson-content .bg-light-orange { background: #fdccb1; }
.cm-lesson-content .bg-light-red { background: #e95263; }

/* Section heading with animated underline */
.cm-lesson-content .headings {
  width: fit-content;
  max-width: 100%;
  margin: 1.75rem 0 1.05rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid #ece5ec;
  position: relative;
}

.cm-lesson-content .headings::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lesson-blue), var(--lesson-purple), var(--lesson-red));
}

/* Content cards */
.cm-lesson-content .content-section,
.cm-lesson-content .addoninfo,
.cm-lesson-content .example-box {
  width: 100%;
  max-width: 100%;
  margin: 1.2rem 0;
  padding: clamp(1rem, 1.5vw, 1.35rem);
  border-radius: 18px;
  border: 1px solid var(--lesson-border);
  background: var(--lesson-card);
  box-shadow: 0 16px 34px rgba(80, 16, 36, 0.07);
}

.cm-lesson-content .content-section {
  text-align: left;
}

.cm-lesson-content .content-section > :last-child,
.cm-lesson-content .addoninfo > :last-child,
.cm-lesson-content .example-box > :last-child {
  margin-bottom: 0;
}

.cm-lesson-content .section-blue,
.cm-lesson-content .addon-blue {
  background: linear-gradient(135deg, #ebf3fd, rgba(255, 255, 255, 0.9));
}
.cm-lesson-content .section-red,
.cm-lesson-content .addon-red {
  background: linear-gradient(135deg, #fff0f3, rgba(255, 255, 255, 0.92));
}

.cm-lesson-content .section-purple,
.cm-lesson-content .addon-purple {
  background: linear-gradient(135deg, #f3e7ff, rgba(255, 255, 255, 0.92));
}

.cm-lesson-content .section-orange,
.cm-lesson-content .addon-orange {
  background: linear-gradient(135deg, #fff0dd, rgba(255, 255, 255, 0.92));
}

.cm-lesson-content .section-green,
.cm-lesson-content .addon-green {
  background: linear-gradient(135deg, #e9f7e4, rgba(255, 255, 255, 0.92));
}

.cm-lesson-content .addon-blue{border-left: 6px solid var(--lesson-blue);}
.cm-lesson-content .addon-red {border-left: 6px solid var(--lesson-red);}
.cm-lesson-content .addon-purple {border-left: 6px solid var(--lesson-purple);}
.cm-lesson-content .addon-orange {border-left: 6px solid var(--lesson-orange);}
.cm-lesson-content .addon-green {border-left: 6px solid var(--lesson-green);}

.cm-lesson-content .section-blue :is(h1, h2, h3, h4, h5, h6),
.cm-lesson-content .addon-blue :is(h1, h2, h3, h4, h5, h6) { color: var(--lesson-blue); }
.cm-lesson-content .section-red :is(h1, h2, h3, h4, h5, h6),
.cm-lesson-content .addon-red :is(h1, h2, h3, h4, h5, h6) { color: var(--lesson-red); }
.cm-lesson-content .section-purple :is(h1, h2, h3, h4, h5, h6),
.cm-lesson-content .addon-purple :is(h1, h2, h3, h4, h5, h6) { color: var(--lesson-purple); }
.cm-lesson-content .section-orange :is(h1, h2, h3, h4, h5, h6),
.cm-lesson-content .addon-orange :is(h1, h2, h3, h4, h5, h6) { color: #d0780c; }
.cm-lesson-content .section-green :is(h1, h2, h3, h4, h5, h6),
.cm-lesson-content .addon-green :is(h1, h2, h3, h4, h5, h6) { color: var(--lesson-green); }

/* Example boxes */
.cm-lesson-content .example-title,
.cm-lesson-content .addoninfo > h2 {
  font-size: clamp(1.1rem, 1vw, 1.28rem);
  font-weight: 650;
  margin-bottom: 0.65rem;
}

.cm-lesson-content .example-content,
.cm-lesson-content .addoninfo > p {
  color: var(--lesson-text);
  line-height: 1.75;
}

.cm-lesson-content .example-box.example-red,
.cm-lesson-content .example-red.example-box {
  border-left: 6px solid var(--lesson-red);
  background: #fff5f7;
}

.cm-lesson-content .example-box.example-blue,
.cm-lesson-content .example-blue.example-box {
  border-left: 6px solid var(--lesson-blue);
  background: #f5f9ff;
}

.cm-lesson-content .example-red .example-title,
.cm-lesson-content .example-red.example-title { color: var(--lesson-red); }
.cm-lesson-content .example-blue .example-title,
.cm-lesson-content .example-blue.example-title { color: var(--lesson-blue); }
.cm-lesson-content .example-red .example-result,
.cm-lesson-content .example-red.example-result { background: var(--lesson-red); }
.cm-lesson-content .example-blue .example-result,
.cm-lesson-content .example-blue.example-result { background: var(--lesson-blue); }
.cm-lesson-content .example-red .example-highlight,
.cm-lesson-content .example-red.example-highlight { background: #fee8e8; }
.cm-lesson-content .example-blue .example-highlight,
.cm-lesson-content .example-blue.example-highlight { background: #e8f0fe; }

.cm-lesson-content .example-highlight {
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  margin: 0.8rem 0;
}

.cm-lesson-content .example-result {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 650;
  border-radius: 14px;
}

/* Custom lesson lists */
.cm-lesson-content :is(.list-num, .list-upper-alpha, .list-lower-alpha, .list-upper-roman, .list-lower-roman, .list-circle, .list-disc, .list-arrow, .list-sub) {
  list-style: none;
  padding-left: 0;
  margin: 0.8rem 0 1rem;
  line-height: 1.75;
}

.cm-lesson-content :is(.list-num, .list-upper-alpha, .list-lower-alpha, .list-upper-roman, .list-lower-roman, .list-circle, .list-disc, .list-arrow, .list-sub) > li {
  display: flex;
  align-items: flex-start;
  gap: 0.72rem;
  margin-bottom: 0.55rem;
  color: var(--lesson-text);
}

.cm-lesson-content :is(.list-num, .list-upper-alpha, .list-lower-alpha, .list-upper-roman, .list-lower-roman, .list-circle, .list-disc, .list-arrow, .list-sub) > li::before {
  flex: 0 0 1.7rem;
  min-width: 1.7rem;
  text-align: right;
  font-weight: 650;
  color: var(--marker-color, var(--lesson-red));
}

.cm-lesson-content .list-num { counter-reset: lesson-num; }
.cm-lesson-content .list-upper-alpha { counter-reset: lesson-alpha-upper; }
.cm-lesson-content .list-lower-alpha { counter-reset: lesson-alpha-lower; }
.cm-lesson-content .list-upper-roman { counter-reset: lesson-roman-upper; }
.cm-lesson-content .list-lower-roman { counter-reset: lesson-roman-lower; }

.cm-lesson-content .list-num > li { counter-increment: lesson-num; }
.cm-lesson-content .list-upper-alpha > li { counter-increment: lesson-alpha-upper; }
.cm-lesson-content .list-lower-alpha > li { counter-increment: lesson-alpha-lower; }
.cm-lesson-content .list-upper-roman > li { counter-increment: lesson-roman-upper; }
.cm-lesson-content .list-lower-roman > li { counter-increment: lesson-roman-lower; }

.cm-lesson-content .list-num > li::before { content: counter(lesson-num) "."; }
.cm-lesson-content .list-upper-alpha > li::before { content: counter(lesson-alpha-upper, upper-alpha) "."; }
.cm-lesson-content .list-lower-alpha > li::before { content: counter(lesson-alpha-lower, lower-alpha) "."; }
.cm-lesson-content .list-upper-roman > li::before { content: counter(lesson-roman-upper, upper-roman) "."; }
.cm-lesson-content .list-lower-roman > li::before { content: counter(lesson-roman-lower, lower-roman) "."; }
.cm-lesson-content .list-circle > li::before { content: "○"; }
.cm-lesson-content .list-disc > li::before { content: "▪"; }
.cm-lesson-content .list-arrow > li::before { content: "▸"; }
.cm-lesson-content .list-sub > li::before { content: "–"; }

.cm-lesson-content .marker-red { --marker-color: var(--lesson-red); }
.cm-lesson-content .marker-blue { --marker-color: var(--lesson-blue); }
.cm-lesson-content .marker-orange { --marker-color: var(--lesson-orange); }
.cm-lesson-content .marker-purple { --marker-color: var(--lesson-purple); }
.cm-lesson-content .marker-green { --marker-color: var(--lesson-green); }

.cm-lesson-content .red-list > li { color: var(--lesson-red); }
.cm-lesson-content .blue-list > li { color: var(--lesson-blue-dark); }
.cm-lesson-content .orange-list > li { color: var(--lesson-orange); }
.cm-lesson-content .purple-list > li { color: var(--lesson-purple); }

.cm-lesson-content .list-soft > li {
  padding: 0.22rem 0.3rem;
  border-radius: 10px;
  transition: background 0.18s ease, transform 0.18s ease;
}

.cm-lesson-content .list-soft > li:hover {
  background: rgba(160, 33, 73, 0.05);
  transform: translateX(2px);
}

.cm-lesson-content .li-body {
  display: block;
  min-width: 0;
}

.cm-lesson-content .li-body > * {
  margin-top: 0.35rem;
}

.cm-lesson-content .li-body > *:first-child {
  margin-top: 0;
}

.cm-lesson-content .sub-list-1 { margin-left: 0.75rem !important; }
.cm-lesson-content .sub-list-2 { margin-left: 1.25rem !important; }
.cm-lesson-content .sub-list-3 { margin-left: 1.75rem !important; }
.cm-lesson-content .sub-list-4 { margin-left: 2.25rem !important; }
.cm-lesson-content .sub-list-5 { margin-left: 2.75rem !important; }
.cm-lesson-content .sub-list-6 { margin-left: 3.25rem !important; }

/* Responsive tables - fixes overflow problems inside lesson layout */
.cm-lesson-content .table-scroll-fix {
  width: 100%;
  max-width: 100%;
  margin: 1.25rem 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border-radius: 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--lesson-red) rgba(160, 33, 73, 0.08);
}

.cm-lesson-content .table-scroll-fix::-webkit-scrollbar {
  height: 8px;
}

.cm-lesson-content .table-scroll-fix::-webkit-scrollbar-track {
  background: rgba(160, 33, 73, 0.08);
  border-radius: 999px;
}

.cm-lesson-content .table-scroll-fix::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--lesson-red), var(--lesson-purple));
  border-radius: 999px;
}

.cm-lesson-content .table-wrapper-red,
.cm-lesson-content .table-wrapper-blue {
  width: 100%;
  min-width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.cm-lesson-content .table-wrapper-blue { box-shadow: 0 14px 34px rgba(47, 109, 215, 0.14); }
.cm-lesson-content .table-wrapper-red { box-shadow: 0 14px 34px rgba(215, 47, 78, 0.14); }

.cm-lesson-content .modern-table-red,
.cm-lesson-content .modern-table-blue,
.cm-lesson-content .my-fix-table {
  width: 100%;
  min-width: 680px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.cm-lesson-content .modern-table-red thead th,
.cm-lesson-content .modern-table-blue thead th,
.cm-lesson-content .my-fix-table thead th,
.cm-lesson-content .my-fix-table tr th {
  color: #fff;
  padding: 0.95rem 1rem;
  font-size: 0.95rem;
  font-weight: 650;
  text-align: left;
  white-space: nowrap;
  vertical-align: top;
}

.cm-lesson-content .modern-table-blue thead th { background: var(--lesson-blue); }
.cm-lesson-content .modern-table-red thead th,
.cm-lesson-content .my-fix-table tr th { background: var(--lesson-red); }

.cm-lesson-content .modern-table-red tbody td,
.cm-lesson-content .modern-table-blue tbody td,
.cm-lesson-content .my-fix-table td {
  padding: 0.85rem 1rem;
  font-size: 0.93rem;
  color: #3d3640;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(160, 33, 73, 0.12);
}

.cm-lesson-content .modern-table-blue tbody tr { border-bottom: 2px solid rgba(26, 115, 232, 0.25); }
.cm-lesson-content .modern-table-red tbody tr { border-bottom: 2px solid rgba(206, 44, 76, 0.25); }
.cm-lesson-content .my-fix-table tbody tr:nth-child(odd) { background: #fff6f8; }
.cm-lesson-content .my-fix-table tbody tr:nth-child(even) { background: #fff; }

.cm-lesson-content .modern-table-red tbody tr,
.cm-lesson-content .modern-table-blue tbody tr,
.cm-lesson-content .my-fix-table tbody tr {
  transition: background 0.18s ease, color 0.18s ease;
}

.cm-lesson-content .modern-table-red tbody tr:hover,
.cm-lesson-content .my-fix-table tbody tr:hover {
  background: var(--lesson-red);
}

.cm-lesson-content .modern-table-blue tbody tr:hover {
  background: var(--lesson-blue);
}

.cm-lesson-content .modern-table-red tbody tr:hover td,
.cm-lesson-content .modern-table-blue tbody tr:hover td,
.cm-lesson-content .my-fix-table tbody tr:hover td {
  color: #fff;
}

.cm-lesson-content .status {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
}

.cm-lesson-content .status.denied {
  background: rgba(215, 47, 78, 0.14);
  color: var(--lesson-red);
}

.cm-lesson-content .status.approved {
  background: rgba(26, 115, 232, 0.14);
  color: var(--lesson-blue);
}

/* Images with click-to-zoom support */
/*.cm-lesson-content .image-center {*/
/*  position: relative;*/
/*  display: flex;*/
/*  justify-content: center;*/
/*  margin: 1.5rem 0;*/
/*}*/

/*.cm-lesson-content .image-center img {*/
/*  max-width: 100%;*/
/*  height: auto;*/
/*  cursor: zoom-in;*/
/*  border-radius: 18px;*/
/*  box-shadow: 0 16px 34px rgba(80, 16, 36, 0.12);*/
/*  transition: transform 0.28s ease, box-shadow 0.28s ease;*/
/*}*/

/*.cm-lesson-content .image-center img:hover {*/
/*  transform: translateY(-2px);*/
/*  box-shadow: 0 20px 44px rgba(80, 16, 36, 0.16);*/
/*}*/

/*.cm-lesson-content .image-center.active {*/
/*  position: fixed;*/
/*  inset: 0;*/
/*  z-index: 9999;*/
/*  display: flex;*/
/*  align-items: center;*/
/*  justify-content: center;*/
/*  padding: 1rem;*/
/*  background: rgba(20, 12, 18, 0.86);*/
/*  backdrop-filter: blur(6px);*/
/*  animation: cmLessonFadeIn 0.22s ease;*/
/*}*/

/*.cm-lesson-content .image-center.active img {*/
/*  max-width: min(94vw, 1200px);*/
/*  max-height: 90vh;*/
/*  cursor: zoom-out;*/
/*  animation: cmLessonZoomIn 0.25s ease;*/
/*}*/

/*.cm-lesson-content .image-close {*/
/*  display: none;*/
/*}*/

/*.cm-lesson-content .image-center.active .image-close {*/
/*  display: grid;*/
/*  place-items: center;*/
/*  position: absolute;*/
/*  top: clamp(1rem, 3vw, 1.6rem);*/
/*  right: clamp(1rem, 3vw, 1.6rem);*/
/*  width: 44px;*/
/*  height: 44px;*/
/*  border-radius: 999px;*/
/*  color: #fff;*/
/*  background: rgba(255, 255, 255, 0.16);*/
/*  border: 1px solid rgba(255, 255, 255, 0.18);*/
/*  cursor: pointer;*/
/*}*/

/*@keyframes cmLessonZoomIn {*/
/*  from { transform: scale(0.92); opacity: 0.75; }*/
/*  to { transform: scale(1); opacity: 1; }*/
/*}*/

/*@keyframes cmLessonFadeIn {*/
/*  from { opacity: 0; }*/
/*  to { opacity: 1; }*/
/*}*/
/* Lesson image preview */
/* Lesson image thumbnail */
.cm-lesson-content .image-center {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.cm-lesson-content .image-center img {
    max-width: 100%;
    height: auto;
    cursor: zoom-in;
    border-radius: 18px;
    box-shadow: 0 16px 34px rgba(80, 16, 36, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cm-lesson-content .image-center img:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(80, 16, 36, 0.18);
}

/* Full browser image viewer */
.cm-image-viewer {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    width: 100vw;
    height: 100vh;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 12, 18, 0.88);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    animation: cmViewerFadeIn 0.22s ease;
}

.cm-image-viewer img {
    width: auto;
    height: auto;
    max-width: 94vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
    animation: cmViewerZoomIn 0.22s ease;
}

.cm-image-viewer-close {
    position: fixed;
    top: 22px;
    right: 24px;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    font-size: 24px;
    cursor: pointer;
    z-index: 10000000;
    transition: background 0.2s ease, transform 0.2s ease;
}

.cm-image-viewer-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

body.cm-image-viewer-open {
    overflow: hidden;
}

@keyframes cmViewerFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes cmViewerZoomIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 700px) {
    .cm-image-viewer {
        padding: 14px;
    }

    .cm-image-viewer img {
        max-width: 96vw;
        max-height: 86vh;
        border-radius: 14px;
    }

    .cm-image-viewer-close {
        top: 14px;
        right: 14px;
        width: 42px;
        height: 42px;
    }
}

/* Quote and note cards */
.cm-lesson-content .quote,
.cm-lesson-content blockquote.quote {
  position: relative;
  margin: 1.7rem 0;
  padding: 1.5rem 1.5rem 1.5rem 3rem;
}

.cm-lesson-content .quote blockquote,
.cm-lesson-content blockquote.quote {
  position: relative;
  margin: 0;
}

.cm-lesson-content .quote blockquote::before,
.cm-lesson-content blockquote.quote::before {
  content: "\201C";
  position: absolute;
  top: -0.85rem;
  left: -1.55rem;
  font-size: 4rem;
  line-height: 1;
  opacity: 0.22;
  font-family: Georgia, serif;
  color: currentColor;
}

.cm-lesson-content cite {
  display: block;
  margin-top: 0.75rem;
  color: var(--lesson-muted);
  font-size: 0.93rem;
}

.cm-lesson-content .do-you-know {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-radius: 18px;
  margin: 1.35rem 0;
  line-height: 1.65;
  box-shadow: 0 14px 28px rgba(80, 16, 36, 0.06);
}

.cm-lesson-content .do-blue { background: linear-gradient(135deg, #eff6ff, #dbeafe); border: 1px solid #93c5fd; color: #1e40af; }
.cm-lesson-content .do-green { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border: 1px solid #86efac; color: #166534; }
.cm-lesson-content .do-orange { background: linear-gradient(135deg, #fefce8, #fef9c3); border: 1px solid #dfc541; color: #7a4509; }
.cm-lesson-content .do-red { background: linear-gradient(135deg, #fef2f2, #fee2e2); border: 1px solid #fca5a5; color: #7f1d1d; }
.cm-lesson-content .do-purple { background: linear-gradient(135deg, #faf5ff, #f3e8ff); border: 1px solid #d8b4fe; color: #5b21b6; }
.cm-lesson-content .do-you-know strong { color: currentColor; }

/* Optional old-style lesson buttons if used inside content */
.cm-lesson-content .container_button {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin: 1rem 0 1.3rem;
}

.cm-lesson-content .one,
.cm-lesson-nav a {
  position: relative;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.cm-lesson-content .one {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--lesson-red), var(--lesson-purple));
  font-weight: 650;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(160, 33, 73, 0.18);
}

.cm-lesson-content .one:hover,
.cm-lesson-nav a:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(160, 33, 73, 0.22);
}

.cm-lesson-content .one:active,
.cm-lesson-nav a:active {
  transform: translateY(0);
}

@media (max-width: 900px) {
  .cm-lesson-content {
    font-size: 0.98rem;
  }

  .cm-lesson-content .content-section,
  .cm-lesson-content .addoninfo,
  .cm-lesson-content .example-box {
    border-radius: 16px;
  }
}

@media (max-width: 680px) {
  .cm-lesson-content {
    line-height: 1.68;
  }

  .cm-lesson-content :is(.list-num, .list-upper-alpha, .list-lower-alpha, .list-upper-roman, .list-lower-roman, .list-circle, .list-disc, .list-arrow, .list-sub) > li {
    gap: 0.55rem;
  }

  .cm-lesson-content :is(.list-num, .list-upper-alpha, .list-lower-alpha, .list-upper-roman, .list-lower-roman, .list-circle, .list-disc, .list-arrow, .list-sub) > li::before {
    flex-basis: 1.35rem;
    min-width: 1.35rem;
  }

  .cm-lesson-content .table-scroll-fix {
    margin-inline: 0;
    border-radius: 15px;
  }

  .cm-lesson-content .modern-table-red,
  .cm-lesson-content .modern-table-blue,
  .cm-lesson-content .my-fix-table {
    min-width: 620px;
  }

  .cm-lesson-content .modern-table-red thead th,
  .cm-lesson-content .modern-table-blue thead th,
  .cm-lesson-content .my-fix-table thead th,
  .cm-lesson-content .my-fix-table tr th,
  .cm-lesson-content .modern-table-red tbody td,
  .cm-lesson-content .modern-table-blue tbody td,
  .cm-lesson-content .my-fix-table td {
    padding: 0.75rem 0.78rem;
    font-size: 0.86rem;
  }

  .cm-lesson-content .quote,
  .cm-lesson-content blockquote.quote {
    padding: 1.2rem 1.1rem 1.2rem 2.25rem;
  }

  .cm-lesson-content .do-you-know {
    display: block;
  }

  .cm-lesson-content .do-you-know strong {
    display: block;
    margin-bottom: 0.25rem;
  }
}

@media (max-width: 420px) {
  .cm-lesson-content .content-section,
  .cm-lesson-content .addoninfo,
  .cm-lesson-content .example-box {
    padding: 0.92rem;
  }

  .cm-lesson-content .sub-list-1,
  .cm-lesson-content .sub-list-2,
  .cm-lesson-content .sub-list-3,
  .cm-lesson-content .sub-list-4,
  .cm-lesson-content .sub-list-5,
  .cm-lesson-content .sub-list-6 {
    margin-left: 0.65rem !important;
  }
}

body.image-zoom-open {
  overflow: hidden;
}
.cm-comments{margin-top:28px;border-radius:24px;padding:clamp(20px,3vw,30px);background:linear-gradient(135deg,rgba(255,255,255,.9),rgba(251,237,242,.72));border:1px solid rgba(160,33,73,.14)}.cm-comments-head h2{margin:.6rem 0 .35rem;color:#821B3B;font-size:clamp(1.4rem,2.2vw,2rem)}.cm-comment-form{display:grid;gap:13px;margin:18px 0 24px;padding:18px;border-radius:20px;background:rgba(255,255,255,.62);border:1px solid rgba(160,33,73,.12)}.cm-comment-form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:13px}.cm-comment-form label{display:grid;gap:6px;color:#6e5361;font-weight:500}.cm-comment-form input,.cm-comment-form textarea{width:100%;border:1px solid rgba(160,33,73,.15);border-radius:13px;padding:11px 13px;background:rgba(255,255,255,.8);font:inherit;color:#4c3b45;transition:.22s}.cm-comment-form input:focus,.cm-comment-form textarea:focus{outline:0;background:#fff;border-color:rgba(206,44,77,.58);box-shadow:0 0 0 4px rgba(206,44,77,.11)}.cm-comment-note{font-size:.86rem;color:#806b77;margin:0}.cm-comments-list{display:grid;gap:14px}.cm-comment-card{padding:17px;border-radius:18px;background:rgba(255,255,255,.82);border:1px solid rgba(160,33,73,.12);box-shadow:0 12px 28px rgba(80,16,36,.06)}.cm-comment-card.is-extra-comment{display:none}.cm-comments.show-all .cm-comment-card.is-extra-comment{display:block}.cm-comment-meta{display:flex;justify-content:space-between;gap:12px;margin-bottom:8px}.cm-comment-meta strong{color:#821B3B}.cm-comment-meta span{color:#ce2c4d;font-size:.9rem}.cm-admin-reply{margin-top:13px;margin-left:clamp(10px,4vw,36px);padding:14px 15px;border-left:4px solid #ce2c4d;border-radius:14px;background:linear-gradient(135deg,#fff0f3,#fff)}.cm-admin-reply strong{color:#821B3B}.cm-admin-reply span{display:inline-flex;margin-left:7px;color:#ce2c4d;font-size:.82rem;font-weight:650}.cm-show-more-comments{justify-self:center;border:1px solid rgba(160,33,73,.2);background:#fff;color:#821B3B;border-radius:999px;padding:10px 16px;font-weight:650;cursor:pointer}.cm-empty-comments{padding:17px;border-radius:18px;background:#fff;border:1px dashed rgba(160,33,73,.22)}@media(max-width:680px){.cm-comment-form-grid{grid-template-columns:1fr}.cm-comment-meta{display:block}.cm-admin-reply{margin-left:0}}