/* Public Website Lectures only. App Lecture styles are intentionally untouched. */
:root {
  --web-navy: #172b4d;
  --web-blue: #176ca6;
  --web-cyan: #16a8dc;
  --web-purple: #6648d9;
  --web-border: #dce8f2;
  --web-muted: #718096;
  --web-page: #f4f8ff;
}

.web-lecture-hero {
  padding: 58px 0 48px;
  background: linear-gradient(135deg, #eaf8ff 0%, #f6f1ff 100%);
  border-bottom: 1px solid #dcecf5;
}

.web-lecture-hero.compact {
  padding: 30px 0 34px;
}

.web-lecture-hero h1 {
  margin: 12px 0 7px;
  color: var(--web-navy);
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.15;
}

.web-lecture-hero p {
  margin: 0;
  color: #52657e;
  font-size: 18px;
}

.web-lecture-hero a,
.web-breadcrumb a,
.web-book-breadcrumb a {
  color: #2678be;
  text-decoration: none;
}

.web-kicker,
.web-book-kicker {
  display: inline-block;
  color: #1689c8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.web-breadcrumb,
.web-book-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: #75859a;
  font-size: 13px;
}

.web-breadcrumb strong,
.web-book-breadcrumb strong {
  color: #50627b;
  font-weight: 600;
}

.web-lecture-page {
  padding: 34px 0 70px;
  background: var(--web-page);
}

.web-browse-layout,
.web-reader-layout {
  display: grid;
  grid-template-columns: minmax(235px, 280px) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.web-lecture-sidebar {
  position: sticky;
  top: 86px;
  z-index: 4;
  overflow: hidden;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--web-border);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(36, 84, 119, .08);
}

.web-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 17px 16px;
  color: var(--web-navy);
  background: linear-gradient(135deg, #effaff, #f7f3ff);
  border-bottom: 1px solid #e3edf5;
}

.web-sidebar-header div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.web-sidebar-header span {
  font-size: 20px;
}

.web-sidebar-close {
  display: none;
  width: 30px;
  height: 30px;
  padding: 0;
  color: #51657f;
  background: #fff;
  border: 1px solid #dce8f2;
  border-radius: 50%;
  font-size: 22px;
  line-height: 25px;
  cursor: pointer;
}

.web-sidebar-all,
.web-sidebar-subject {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #274260;
  text-decoration: none;
}

.web-sidebar-all {
  margin: 12px 12px 5px;
  padding: 10px 11px;
  border-radius: 9px;
}

.web-sidebar-all:hover,
.web-sidebar-all.selected {
  color: #125db7;
  background: #edf5ff;
}

.web-sidebar-all span {
  font-size: 19px;
}

.web-sidebar-group {
  border-top: 1px solid #eef3f7;
}

.web-sidebar-subject {
  padding: 13px 14px 10px;
}

.web-sidebar-subject:hover {
  color: #135fb8;
  background: #fbfdff;
}

.web-sidebar-subject > span:nth-child(2) {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.web-sidebar-subject strong {
  overflow: hidden;
  color: var(--web-navy);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-sidebar-subject small {
  color: #8493a5;
  font-size: 11px;
}

.web-subject-icon {
  font-size: 20px;
}

.web-sidebar-subject b {
  color: #6e82a0;
  font-size: 16px;
}

.web-sidebar-topics {
  display: grid;
  gap: 2px;
  padding: 0 12px 11px 42px;
}

.web-sidebar-topics a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 7px 9px;
  color: #5c6e84;
  border-left: 2px solid transparent;
  font-size: 13px;
  text-decoration: none;
}

.web-sidebar-topics a span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-sidebar-topics a small {
  flex: 0 0 auto;
  color: #9aa8b8;
  font-size: 11px;
}

.web-sidebar-topics a:hover,
.web-sidebar-topics a.selected {
  color: #145fb8;
  background: #f0f7ff;
  border-left-color: #2b8ff2;
  border-radius: 0 7px 7px 0;
}

.web-sidebar-group.is-selected > .web-sidebar-subject {
  color: #115db8;
  background: #f7fbff;
}

.web-sidebar-group.is-selected > .web-sidebar-subject strong {
  color: #115db8;
}

.web-lecture-list-panel {
  min-width: 0;
}

.web-list-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.web-list-heading h2 {
  margin: 0 0 3px;
  color: var(--web-navy);
  font-size: clamp(22px, 3vw, 30px);
}

.web-list-heading p {
  margin: 0;
  color: var(--web-muted);
}

.web-list-heading .web-breadcrumb {
  margin-bottom: 8px;
}

.web-total-badge {
  flex: 0 0 auto;
  padding: 9px 13px;
  color: #52647a;
  background: #fff;
  border: 1px solid var(--web-border);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
}

.web-lecture-list {
  display: grid;
  gap: 12px;
}

.web-lecture-list-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 13px 14px;
  background: #fff;
  border: 1px solid #e2edf5;
  border-radius: 13px;
  box-shadow: 0 6px 18px rgba(36, 84, 119, .055);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.web-lecture-list-card:hover {
  border-color: #b9d9f2;
  box-shadow: 0 11px 25px rgba(36, 84, 119, .11);
  transform: translateY(-1px);
}

.web-list-lecture-icon {
  display: grid;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  overflow: hidden;
  place-items: center;
  color: #5843bd;
  background: linear-gradient(135deg, #eef3ff, #f8efff);
  border: 1px solid #dfe3fa;
  border-radius: 11px;
  font-size: 25px;
}

.web-list-lecture-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.web-list-lecture-info {
  min-width: 0;
  flex: 1;
}

.web-list-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: #8290a3;
  font-size: 11px;
}

.web-free,
.web-premium {
  font-weight: 700;
}

.web-free {
  color: #1b9b67;
}

.web-premium {
  color: #d48613;
}

.web-list-lecture-info h3 {
  overflow: hidden;
  margin: 4px 0 3px;
  color: var(--web-navy);
  font-size: 17px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-list-lecture-info p {
  overflow: hidden;
  margin: 0;
  color: #7a8ba0;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-list-lecture-info p span {
  padding: 0 3px;
  color: #b2bdc9;
}

.web-list-review-summary {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  padding: 6px 8px;
  background: linear-gradient(135deg, #fff8e8, #fff2f7);
  border: 1px solid #f0e0cf;
  border-radius: 7px;
}

.web-list-review-title {
  color: #9a681c;
  font-size: 10px;
  font-weight: 800;
}

.web-list-review-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: #79889a;
  font-size: 11px;
}

.web-list-review-line strong {
  color: #c57816;
  font-size: 12px;
}

.web-list-review-stars {
  color: #eda51b;
  letter-spacing: .5px;
}

.web-view-lecture-button,
.web-primary-button,
.web-resource-button,
.web-reader-pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #1757c1;
  background: #f5f9ff;
  border: 1px solid #cddff5;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.web-view-lecture-button {
  flex: 0 0 auto;
  padding: 9px 11px;
}

.web-view-lecture-button:hover,
.web-primary-button:hover,
.web-reader-pdf:hover {
  color: #fff;
  background: #1768d0;
  border-color: #1768d0;
}

.web-view-lecture-button b {
  font-size: 16px;
}

.web-pagination {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 24px;
}

.web-pagination a,
.web-pagination span {
  display: grid;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  place-items: center;
  color: #50647c;
  background: #fff;
  border: 1px solid #dce8f2;
  border-radius: 7px;
  font-size: 12px;
  text-decoration: none;
}

.web-pagination a:hover,
.web-pagination span.active {
  color: #fff;
  background: #1768d0;
  border-color: #1768d0;
}

.web-empty-state {
  padding: 55px 20px;
  color: #687b91;
  text-align: center;
  background: #fff;
  border: 1px dashed #cbdce9;
  border-radius: 16px;
}

.web-empty-state > span {
  display: block;
  margin-bottom: 10px;
  font-size: 36px;
}

.web-empty-state h3 {
  margin: 0 0 15px;
  color: var(--web-navy);
}

.web-primary-button {
  padding: 11px 15px;
}

.web-mobile-toolbar {
  display: none;
  margin-bottom: 15px;
}

.web-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: #1757c1;
  background: #fff;
  border: 1px solid #cddff5;
  border-radius: 9px;
  font-weight: 700;
  cursor: pointer;
}

.web-sidebar-backdrop {
  display: none;
}

/* Home page horizontal Website Lecture cards */
.web-home-lecture-section {
  overflow: hidden;
}

.web-home-lecture-rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 3px 2px 13px;
  scroll-behavior: smooth;
  scrollbar-color: #9bc8e7 transparent;
  scrollbar-width: thin;
}

.web-home-subcategory-card {
  display: flex;
  flex: 0 0 220px;
  flex-direction: column;
  min-height: 166px;
  padding: 14px;
  color: var(--web-navy);
  background: linear-gradient(145deg, #fff 0%, #f2fbff 100%);
  border: 1px solid #d6e9f5;
  border-radius: 15px;
  box-shadow: 0 8px 21px rgba(28, 93, 133, .08);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.web-home-subcategory-card:hover {
  box-shadow: 0 13px 28px rgba(28, 93, 133, .15);
  transform: translateY(-2px);
}

.web-home-lecture-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.web-home-lecture-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #1768d0, #8d4dd9);
  border-radius: 12px;
  font-size: 21px;
}

.web-home-lecture-icon img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.web-home-view-topics {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  color: #fff;
  background: linear-gradient(135deg, #1768d0 0%, #8d4dd9 100%);
  border-radius: 8px;
  box-shadow: 0 5px 12px rgba(55, 88, 203, .2);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transition: filter .15s ease, transform .15s ease;
}

.web-home-subcategory-card:hover .web-home-view-topics {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.web-home-subcategory-card h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 14px 0 5px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--web-navy);
  font-size: 15px;
  line-height: 1.35;
}

.web-home-subcategory-card p {
  margin: auto 0 0;
  color: #71849b;
  font-size: 12px;
}

/* Reader / book-style content */
.web-reader-page {
  padding-top: 28px;
}

.web-reader-sidebar {
  padding-bottom: 14px;
}

.web-reader-back {
  display: block;
  margin: 13px 14px 8px;
  padding: 8px 10px;
  color: #1768c5;
  background: #f3f8ff;
  border-radius: 8px;
  font-size: 12px;
  text-decoration: none;
}

.web-reader-lecture-list {
  display: grid;
  gap: 2px;
  max-height: 490px;
  overflow-y: auto;
  padding: 3px 10px 10px;
}

.web-reader-lecture-list a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 9px 8px;
  color: #5c6e84;
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  font-size: 12px;
  text-decoration: none;
}

.web-reader-lecture-list a:hover,
.web-reader-lecture-list a.selected {
  color: #174f9f;
  background: #edf5ff;
  border-left-color: #246de2;
}

.web-reader-lecture-list a > span {
  color: #91a0b3;
  font-size: 11px;
  font-weight: 700;
}

.web-reader-lecture-list strong {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-reader-lecture-list em {
  font-style: normal;
}

.web-reader-pdf {
  width: calc(100% - 28px);
  margin: 3px 14px 15px;
  padding: 10px;
}

.web-reader-progress {
  margin: 0 14px;
  padding-top: 14px;
  border-top: 1px solid #e4edf4;
}

.web-reader-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: #52667e;
  font-size: 12px;
}

.web-reader-progress strong {
  color: #1a69c8;
}

.web-progress-track {
  height: 7px;
  overflow: hidden;
  background: #e7edf4;
  border-radius: 20px;
}

.web-progress-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #16a8dc, #7356dd);
  border-radius: inherit;
  transition: width .2s ease;
}

.web-reader-progress small {
  display: block;
  margin-top: 7px;
  color: #8b99aa;
  font-size: 11px;
}

.web-book-page {
  min-width: 0;
  padding: clamp(20px, 4vw, 42px);
  background: #fffdf8;
  border: 1px solid #eee8db;
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(60, 82, 100, .09);
}

.web-book-breadcrumb {
  margin-bottom: 24px;
}

.web-book-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee8db;
}

.web-book-header h2 {
  margin: 7px 0 0;
  color: #182e52;
  font-size: clamp(25px, 4vw, 35px);
  line-height: 1.3;
}

.web-book-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.web-book-actions button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #51677d;
  background: #fff;
  border: 1px solid #e0e5e9;
  border-radius: 8px;
  cursor: pointer;
}

.web-book-actions button:hover {
  color: #fff;
  background: #1768d0;
  border-color: #1768d0;
}

.web-feature-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 370px;
  height: auto;
  margin: 25px auto;
  border-radius: 13px;
  object-fit: contain;
}

.web-book-content {
  overflow-wrap: anywhere;
  color: #293b51;
  font-family: 'Hind Siliguri', sans-serif;
  font-size: 18px;
  line-height: 1.9;
}

.web-book-content h1,
.web-book-content h2,
.web-book-content h3,
.web-book-content h4 {
  color: #176ca6;
  line-height: 1.4;
}

.web-book-content h1,
.web-book-content h2 {
  margin: 1.4em 0 .65em;
  padding: 9px 14px;
  background: linear-gradient(90deg, #e8f8ff, transparent);
  border-left: 5px solid #35a9d8;
}

.web-book-content h3,
.web-book-content h4 {
  margin: 1.25em 0 .5em;
}

.web-book-content p {
  margin: 0 0 1em;
}

.web-book-content ul,
.web-book-content ol {
  padding-left: 1.6em;
}

.web-book-content li {
  margin: 4px 0;
}

.web-book-content strong,
.web-book-content b {
  color: #233c72;
}

.web-book-content table {
  display: block;
  max-width: 100%;
  margin: 20px 0;
  overflow-x: auto;
  border-collapse: collapse;
}

.web-book-content th,
.web-book-content td {
  min-width: 100px;
  padding: 8px 12px;
  border: 1px solid #c9dce8;
}

.web-book-content th {
  color: #14567c;
  background: #e6f6fc;
}

.web-book-content img,
.web-content-image {
  max-width: 100%;
  height: auto;
  cursor: zoom-in;
  border-radius: 10px;
}

.web-book-content blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  background: #fff6df;
  border-left: 4px solid #f0ad4e;
}

.web-book-content mark {
  padding: 2px 5px;
  border-radius: 4px;
}

.web-book-content a {
  color: #087fbd;
  text-decoration: underline;
}

.web-book-content pre,
.web-book-content code {
  max-width: 100%;
  overflow-x: auto;
}

.web-resources {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid #e8e1d5;
}

.web-resource-button {
  padding: 11px 14px;
}

.web-resource-button.pdf {
  color: #c13535;
  background: #fff4f4;
  border-color: #f0caca;
}

.web-resource-button.video {
  color: #8b3bb6;
  background: #fbf2ff;
  border-color: #e7c8f2;
}

.web-resource-button:hover {
  color: #fff;
  background: #1768d0;
  border-color: #1768d0;
}

.web-prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid #e8e1d5;
}

.web-prev-next a {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px 15px;
  color: #28476b;
  background: #fff;
  border: 1px solid #e0e7eb;
  border-radius: 10px;
  text-decoration: none;
}

.web-prev-next a.next {
  text-align: right;
}

.web-prev-next a:hover {
  color: #155eb4;
  border-color: #a9ccea;
}

.web-prev-next small {
  color: #1b86c0;
  font-size: 11px;
  font-weight: 700;
}

.web-prev-next strong {
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Public Website Lecture ratings and reviews */
.web-review-section {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid #e8e1d5;
}

.web-review-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.web-review-kicker {
  display: inline-block;
  color: #8b4cce;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.web-review-heading h3 {
  margin: 6px 0 0;
  color: #1b3156;
  font-size: clamp(20px, 3vw, 27px);
  line-height: 1.35;
}

.web-review-summary {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 2px;
  padding: 10px 13px;
  background: linear-gradient(135deg, #fff6df, #fff0f5);
  border: 1px solid #f1dfc7;
  border-radius: 11px;
}

.web-review-summary strong {
  color: #d57a19;
  font-size: 22px;
  line-height: 1;
}

.web-review-summary .web-review-summary-title {
  color: #9a681c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
}

.web-review-summary small {
  color: #7d8796;
  font-size: 11px;
}

.web-review-stars {
  color: #eda51b;
  letter-spacing: 1px;
  white-space: nowrap;
}

.web-review-note {
  margin: 12px 0 17px;
  color: #718096;
  font-size: 13px;
}

.web-review-flash {
  margin: 12px 0;
  padding: 11px 13px;
  border-radius: 9px;
  font-size: 13px;
}

.web-review-flash.success {
  color: #176a4a;
  background: #edfff6;
  border: 1px solid #bce9d2;
}

.web-review-flash.error {
  color: #a33b3b;
  background: #fff1f1;
  border: 1px solid #efc5c5;
}

.web-review-form {
  padding: 18px;
  background: linear-gradient(135deg, #f5fbff, #fbf7ff);
  border: 1px solid #dceaf4;
  border-radius: 13px;
}

.web-review-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.web-review-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, .6fr);
  gap: 14px;
}

.web-review-field {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
  color: #425977;
  font-size: 13px;
  font-weight: 700;
}

.web-review-field b,
.web-review-rating-field b {
  color: #d34c66;
}

.web-review-field input[type="text"],
.web-review-field textarea {
  width: 100%;
  padding: 10px 11px;
  color: #293b51;
  background: #fff;
  border: 1px solid #ccdeeb;
  border-radius: 8px;
  font: inherit;
  font-weight: 400;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.web-review-field textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.6;
}

.web-review-field input:focus,
.web-review-field textarea:focus {
  border-color: #5b89e5;
  box-shadow: 0 0 0 3px rgba(63, 127, 222, .12);
}

.web-review-rating-field {
  min-width: 0;
  padding: 0;
  border: 0;
}

.web-review-rating-field legend {
  margin-bottom: 7px;
  color: #425977;
  font-size: 13px;
  font-weight: 700;
}

.web-review-star-picker {
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 42px;
  padding: 0 10px;
  background: #fff;
  border: 1px solid #ccdeeb;
  border-radius: 8px;
}

.web-review-star-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.web-review-star-picker label {
  color: #c4ccd6;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  transition: color .15s ease, transform .15s ease;
}

.web-review-star-picker label:hover,
.web-review-star-picker input:checked + label {
  color: #f0a51d;
  transform: translateY(-1px);
}

.web-review-star-picker input:focus-visible + label {
  outline: 2px solid #4f86df;
  outline-offset: 3px;
  border-radius: 3px;
}

.web-review-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.web-review-form-footer small {
  color: #8795a6;
  font-size: 11px;
}

.web-review-submit {
  padding: 10px 15px;
  color: #fff;
  background: linear-gradient(135deg, #1768d0, #7a4dd7);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 7px 15px rgba(67, 87, 194, .18);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.web-review-submit:hover {
  filter: brightness(1.08);
}

.web-review-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.web-review-item {
  padding: 14px 15px;
  background: #fff;
  border: 1px solid #e4e8eb;
  border-left: 4px solid #8c67dd;
  border-radius: 9px;
}

.web-review-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.web-review-item-head strong {
  color: #263e65;
  font-size: 14px;
}

.web-review-item p {
  margin: 8px 0 5px;
  color: #52657e;
  font-size: 14px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.web-review-item time {
  color: #9aa5b2;
  font-size: 11px;
}

.web-review-empty {
  margin-top: 18px;
  padding: 15px;
  color: #78899b;
  background: #fff;
  border: 1px dashed #cadce9;
  border-radius: 9px;
  font-size: 13px;
  text-align: center;
}

.web-review-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  color: #7b8a9d;
  font-size: 12px;
}

.web-review-pagination a {
  color: #1768c5;
  text-decoration: none;
}

.web-review-pagination a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .web-review-heading {
    display: block;
  }

  .web-review-summary {
    display: inline-grid;
    justify-items: start;
    margin-top: 12px;
  }

  .web-review-form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .web-review-item-head {
    align-items: flex-start;
    display: grid;
    gap: 5px;
  }

  .web-review-form-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  .web-mobile-toolbar {
    display: flex;
  }

  .web-browse-layout,
  .web-reader-layout {
    display: block;
  }

  .web-lecture-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(88vw, 340px);
    max-height: none;
    overflow-y: auto;
    border-radius: 0 16px 16px 0;
    box-shadow: 12px 0 35px rgba(11, 37, 63, .2);
    transform: translateX(-105%);
    transition: transform .22s ease;
  }

  .web-lecture-sidebar.is-open {
    transform: translateX(0);
  }

  .web-sidebar-close {
    display: block;
  }

  .web-sidebar-backdrop {
    position: fixed;
    z-index: 3;
    inset: 0;
    display: block;
    background: rgba(12, 28, 48, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
  }

  .web-sidebar-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  body.web-sidebar-lock {
    overflow: hidden;
  }
}

@media (max-width: 640px) {
  .web-lecture-hero {
    padding: 38px 0 32px;
  }

  .web-lecture-hero.compact {
    padding: 24px 0 27px;
  }

  .web-lecture-page {
    padding: 24px 0 48px;
  }

  .web-list-heading {
    display: block;
  }

  .web-total-badge {
    display: inline-block;
    margin-top: 10px;
  }

  .web-lecture-list-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .web-list-lecture-info {
    padding-top: 2px;
  }

  .web-list-lecture-info h3 {
    white-space: normal;
  }

  .web-view-lecture-button {
    width: calc(100% - 70px);
    margin-left: 70px;
  }

  .web-book-header {
    display: block;
  }

  .web-book-actions {
    margin-top: 12px;
  }

  .web-book-content {
    font-size: 16px;
    line-height: 1.8;
  }

  .web-prev-next {
    grid-template-columns: 1fr;
  }

  .web-prev-next a.next {
    text-align: left;
  }
}

@media print {
  .site-header,
  .premium-header,
  .premium-footer,
  .web-detail-hero,
  .web-mobile-toolbar,
  .web-reader-sidebar,
  .web-book-actions,
  .web-resources,
  .web-prev-next {
    display: none !important;
  }

  .web-reader-layout,
  .web-reader-page,
  .web-book-page {
    display: block;
    padding: 0;
    background: #fff;
    border: 0;
    box-shadow: none;
  }
}

/* Smart premium content renderer ----------------------------------------- */
/*
 * These styles are limited to the public Website Lecture book content.
 * The Admin HTML remains the source of truth; JavaScript only adds visual
 * classes and MCQ wrappers in the browser.
 */
.web-book-content.web-smart-content {
  --smart-ink: #293c58;
  --smart-muted: #687b91;
  color: var(--smart-ink);
}

.web-book-content.web-smart-content > * {
  max-width: 100%;
}

.web-book-content.web-smart-content .web-content-heading {
  --heading-accent: #168bd0;
  --heading-ink: #155e8c;
  --heading-soft: #eaf8ff;
  margin: 1.55em 0 .75em;
  padding: 13px 17px 13px 20px;
  color: var(--heading-ink);
  background: linear-gradient(100deg, var(--heading-soft) 0%, rgba(255, 255, 255, .74) 88%);
  border: 1px solid color-mix(in srgb, var(--heading-accent) 22%, #fff);
  border-left: 6px solid var(--heading-accent);
  border-radius: 14px;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--heading-accent) 12%, transparent);
  line-height: 1.4;
}

.web-book-content.web-smart-content .web-content-heading[data-content-tone="1"] {
  --heading-accent: #168bd0;
  --heading-ink: #155e8c;
  --heading-soft: #eaf8ff;
}

.web-book-content.web-smart-content .web-content-heading[data-content-tone="2"] {
  --heading-accent: #7654d8;
  --heading-ink: #5540a2;
  --heading-soft: #f3efff;
}

.web-book-content.web-smart-content .web-content-heading[data-content-tone="3"] {
  --heading-accent: #e28a25;
  --heading-ink: #9a5a10;
  --heading-soft: #fff6e7;
}

.web-book-content.web-smart-content .web-content-heading[data-content-tone="4"] {
  --heading-accent: #1ca477;
  --heading-ink: #167353;
  --heading-soft: #eafbf5;
}

.web-book-content.web-smart-content .web-content-heading[data-content-tone="5"] {
  --heading-accent: #e05c78;
  --heading-ink: #a23d58;
  --heading-soft: #fff0f4;
}

.web-book-content.web-smart-content .web-content-heading[data-content-tone="6"] {
  --heading-accent: #4d73d8;
  --heading-ink: #3454a8;
  --heading-soft: #eef2ff;
}

.web-book-content.web-smart-content h1.web-content-heading,
.web-book-content.web-smart-content h2.web-content-heading {
  font-size: 1.2em;
}

.web-book-content.web-smart-content h5.web-content-heading,
.web-book-content.web-smart-content h6.web-content-heading {
  font-size: 1em;
}

.web-book-content.web-smart-content .web-auto-callout {
  --callout-accent: #2f8fd2;
  --callout-ink: #285a80;
  --callout-soft: #edf8ff;
  position: relative;
  margin: 19px 0;
  padding: 13px 17px 13px 23px;
  color: var(--callout-ink);
  background: linear-gradient(135deg, var(--callout-soft), #fff);
  border: 1px solid color-mix(in srgb, var(--callout-accent) 25%, #fff);
  border-left: 5px solid var(--callout-accent);
  border-radius: 12px;
  box-shadow: 0 7px 17px color-mix(in srgb, var(--callout-accent) 10%, transparent);
}

.web-book-content.web-smart-content .web-auto-callout::before {
  position: absolute;
  top: 11px;
  left: 7px;
  color: var(--callout-accent);
  content: "✦";
  font-size: 13px;
  font-weight: 800;
}

.web-book-content.web-smart-content .web-auto-callout--definition {
  --callout-accent: #168bd0;
  --callout-ink: #155e8c;
  --callout-soft: #eaf8ff;
}

.web-book-content.web-smart-content .web-auto-callout--discovery {
  --callout-accent: #7654d8;
  --callout-ink: #5540a2;
  --callout-soft: #f3efff;
}

.web-book-content.web-smart-content .web-auto-callout--timeline {
  --callout-accent: #e28a25;
  --callout-ink: #9a5a10;
  --callout-soft: #fff6e7;
}

.web-book-content.web-smart-content .web-auto-callout--language {
  --callout-accent: #1ca477;
  --callout-ink: #167353;
  --callout-soft: #eafbf5;
}

.web-book-content.web-smart-content .web-auto-callout--example {
  --callout-accent: #e05c78;
  --callout-ink: #a23d58;
  --callout-soft: #fff0f4;
}

.web-book-content.web-smart-content .web-auto-callout--important {
  --callout-accent: #d27b20;
  --callout-ink: #8c5414;
  --callout-soft: #fff8df;
}

.web-book-content.web-smart-content > p:not(.web-auto-callout):not(.web-mcq-question):not(.web-mcq-source):not(.web-mcq-answer):not(.web-mcq-explanation):not(.web-mcq-explanation-text) {
  margin-bottom: 1.05em;
}

.web-book-content.web-smart-content > ul,
.web-book-content.web-smart-content > ol {
  margin-top: .75em;
  margin-bottom: 1.25em;
}

.web-book-content.web-smart-content .web-content-table,
.web-book-content.web-smart-content table {
  width: 100%;
  min-width: 520px;
  color: #31475f;
  background: #fff;
  border: 1px solid #d9e6ee;
  border-radius: 11px;
  box-shadow: 0 7px 18px rgba(37, 84, 116, .07);
}

.web-book-content.web-smart-content .wp-block-table,
.web-book-content.web-smart-content figure:has(table) {
  max-width: 100%;
  margin: 22px 0;
  overflow-x: auto;
  border-radius: 12px;
}

.web-book-content.web-smart-content .web-content-table th,
.web-book-content.web-smart-content .web-content-table td,
.web-book-content.web-smart-content table th,
.web-book-content.web-smart-content table td {
  padding: 10px 13px;
  border: 1px solid #d7e5ed;
  vertical-align: top;
}

.web-book-content.web-smart-content .web-content-table th,
.web-book-content.web-smart-content table th {
  color: #fff;
  background: linear-gradient(135deg, #176ca6, #7252d5);
  font-weight: 700;
}

.web-book-content.web-smart-content .web-content-table tr:nth-child(even) td,
.web-book-content.web-smart-content table tr:nth-child(even) td {
  background: #f7fbff;
}

.web-book-content.web-smart-content .web-mcq-card {
  --mcq-accent: #287bd1;
  --mcq-ink: #234c80;
  --mcq-soft: #eef7ff;
  --mcq-option: #f8fcff;
  margin: 27px 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--mcq-accent) 25%, #dfe9f1);
  border-top: 4px solid var(--mcq-accent);
  border-radius: 17px;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--mcq-accent) 13%, transparent);
}

.web-book-content.web-smart-content .web-mcq-card[data-mcq-tone="1"] {
  --mcq-accent: #287bd1;
  --mcq-ink: #234c80;
  --mcq-soft: #eef7ff;
  --mcq-option: #f8fcff;
}

.web-book-content.web-smart-content .web-mcq-card[data-mcq-tone="2"] {
  --mcq-accent: #7654d8;
  --mcq-ink: #5540a2;
  --mcq-soft: #f5f1ff;
  --mcq-option: #fcfaff;
}

.web-book-content.web-smart-content .web-mcq-card[data-mcq-tone="3"] {
  --mcq-accent: #e28a25;
  --mcq-ink: #8d5819;
  --mcq-soft: #fff7e9;
  --mcq-option: #fffdf8;
}

.web-book-content.web-smart-content .web-mcq-card[data-mcq-tone="4"] {
  --mcq-accent: #1ca477;
  --mcq-ink: #176e53;
  --mcq-soft: #edfbf6;
  --mcq-option: #f9fffc;
}

.web-book-content.web-smart-content .web-mcq-card[data-mcq-tone="5"] {
  --mcq-accent: #e05c78;
  --mcq-ink: #a23d58;
  --mcq-soft: #fff1f5;
  --mcq-option: #fffafd;
}

.web-book-content.web-smart-content .web-mcq-card[data-mcq-tone="6"] {
  --mcq-accent: #4d73d8;
  --mcq-ink: #3454a8;
  --mcq-soft: #f0f3ff;
  --mcq-option: #fafbff;
}

.web-book-content.web-smart-content .web-mcq-card > .web-mcq-question {
  margin: 0;
  padding: 16px 20px 15px;
  color: var(--mcq-ink);
  background: linear-gradient(115deg, var(--mcq-soft), #fff);
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--mcq-accent) 18%, #fff);
  font-size: 1.04em;
  font-weight: 700;
  line-height: 1.65;
}

.web-book-content.web-smart-content .web-mcq-card > .web-mcq-question::before {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-right: 9px;
  padding: 1px 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--mcq-accent), #8b55d9);
  border-radius: 999px;
  content: "প্রশ্ন";
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
  vertical-align: 2px;
}

.web-book-content.web-smart-content .web-mcq-card > .web-mcq-source {
  margin: 0;
  padding: 11px 20px 0;
  color: #8b6a40;
  font-size: .82em;
  font-style: italic;
}

.web-book-content.web-smart-content .web-mcq-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 15px 18px 7px;
}

.web-book-content.web-smart-content .web-mcq-option {
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  color: #425b75;
  background: var(--mcq-option);
  border: 1px solid color-mix(in srgb, var(--mcq-accent) 18%, #e2ebf2);
  border-left: 4px solid color-mix(in srgb, var(--mcq-accent) 60%, #fff);
  border-radius: 10px;
  font-size: .92em;
  line-height: 1.65;
}

.web-book-content.web-smart-content .web-mcq-answer {
  margin: 11px 18px 0;
  padding: 11px 14px;
  color: #176b4d;
  background: linear-gradient(135deg, #effcf5, #fff);
  border: 1px solid #bfe8d2;
  border-radius: 10px;
  font-weight: 800;
}

.web-book-content.web-smart-content .web-mcq-explanation,
.web-book-content.web-smart-content .web-mcq-explanation-text {
  margin: 11px 18px 0;
  padding: 11px 14px;
  color: #5a6473;
  background: #fffaf0;
  border-left: 4px solid #e0a13e;
  border-radius: 9px;
  font-size: .91em;
  line-height: 1.75;
}

.web-book-content.web-smart-content .web-mcq-explanation {
  color: #895916;
  background: linear-gradient(135deg, #fff7e5, #fffdf8);
  font-weight: 800;
}

.web-book-content.web-smart-content .web-mcq-card > :last-child {
  margin-bottom: 17px;
}

@media (max-width: 640px) {
  .web-book-content.web-smart-content .web-content-heading {
    padding: 11px 13px 11px 16px;
    border-left-width: 5px;
  }

  .web-book-content.web-smart-content .web-mcq-options {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 12px 4px;
  }

  .web-book-content.web-smart-content .web-mcq-card > .web-mcq-question {
    padding: 14px 14px 13px;
  }

  .web-book-content.web-smart-content .web-mcq-card > .web-mcq-source {
    padding-left: 14px;
    padding-right: 14px;
  }

  .web-book-content.web-smart-content .web-mcq-answer,
  .web-book-content.web-smart-content .web-mcq-explanation,
  .web-book-content.web-smart-content .web-mcq-explanation-text {
    margin-left: 12px;
    margin-right: 12px;
  }
}

@media print {
  .web-book-content.web-smart-content .web-mcq-card {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* Compact app-like smart lines ------------------------------------------- */
/*
 * The Admin editor may save one item per <p> or several items separated by
 * <br>. Keep those items close together like the App reader. Only recognised
 * special markers receive an icon/colour treatment; ordinary paragraphs,
 * bullets and numbering remain plain and readable.
 */
.web-book-content.web-smart-content {
  line-height: 1.72;
}

.web-book-content.web-smart-content > p,
.web-book-content.web-smart-content > .web-smart-plain-line {
  margin-top: 0 !important;
  margin-bottom: 6px !important;
  padding-top: 1px;
  padding-bottom: 1px;
}

.web-book-content.web-smart-content > ul,
.web-book-content.web-smart-content > ol {
  margin-top: 5px !important;
  margin-bottom: 9px !important;
}

.web-book-content.web-smart-content > ul > li,
.web-book-content.web-smart-content > ol > li {
  margin-top: 1px;
  margin-bottom: 1px;
  line-height: 1.68;
}

.web-book-content.web-smart-content > blockquote {
  margin-top: 8px !important;
  margin-bottom: 8px !important;
  padding: 8px 12px;
}

.web-book-content.web-smart-content .web-content-heading {
  margin-top: 10px;
  margin-bottom: 6px;
  padding: 8px 11px 8px 14px;
  border-radius: 10px;
  line-height: 1.45;
}

.web-book-content.web-smart-content .web-auto-callout {
  margin-top: 7px;
  margin-bottom: 7px;
  padding: 7px 11px 7px 16px;
  border-radius: 10px;
  line-height: 1.68;
}

.web-book-content.web-smart-content .web-auto-callout::before {
  top: 8px;
  left: 5px;
  font-size: 11px;
}

.web-book-content.web-smart-content .web-smart-icon-line {
  --smart-line-accent: #2563eb;
  --smart-line-ink: #24558c;
  --smart-line-soft: #edf6ff;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin: 0 0 5px !important;
  padding: 1px 2px;
  line-height: 1.68;
}

.web-book-content.web-smart-content .web-smart-line-body {
  display: block;
  min-width: 0;
}

.web-book-content.web-smart-content .web-smart-line-body strong,
.web-book-content.web-smart-content .web-smart-line-body b {
  color: inherit;
}

.web-book-content.web-smart-content .web-smart-symbol {
  display: grid;
  width: 28px;
  min-height: 28px;
  place-items: center;
  margin-top: 1px;
  color: #fff;
  background: linear-gradient(135deg, var(--smart-line-accent), #7c3aed);
  border-radius: 8px;
  box-shadow: 0 5px 12px color-mix(in srgb, var(--smart-line-accent) 24%, transparent);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.web-book-content.web-smart-content .web-smart-icon-line--success {
  --smart-line-accent: #16a34a;
  --smart-line-ink: #176b4d;
  --smart-line-soft: #effcf5;
}

.web-book-content.web-smart-content .web-smart-icon-line--danger {
  --smart-line-accent: #dc2626;
  --smart-line-ink: #9f2530;
  --smart-line-soft: #fff1f2;
}

.web-book-content.web-smart-content .web-smart-icon-line--info {
  --smart-line-accent: #2563eb;
  --smart-line-ink: #145ca1;
  --smart-line-soft: #edf6ff;
}

.web-book-content.web-smart-content .web-smart-icon-line--warning {
  --smart-line-accent: #d97706;
  --smart-line-ink: #93590f;
  --smart-line-soft: #fff8e9;
}

.web-book-content.web-smart-content .web-smart-icon-line--purple {
  --smart-line-accent: #7c3aed;
  --smart-line-ink: #5b3aa5;
  --smart-line-soft: #f5f0ff;
}

.web-book-content.web-smart-content .web-smart-icon-line--yellow {
  --smart-line-accent: #a16207;
  --smart-line-ink: #80540e;
  --smart-line-soft: #fffbe8;
}

.web-book-content.web-smart-content .web-smart-icon-line--orange {
  --smart-line-accent: #ea580c;
  --smart-line-ink: #a64211;
  --smart-line-soft: #fff3ea;
}

.web-book-content.web-smart-content .web-smart-icon-line--teal {
  --smart-line-accent: #0f766e;
  --smart-line-ink: #176b68;
  --smart-line-soft: #ecfffb;
}

.web-book-content.web-smart-content .web-smart-icon-line--rose {
  --smart-line-accent: #e11d48;
  --smart-line-ink: #a33352;
  --smart-line-soft: #fff1f5;
}

.web-book-content.web-smart-content .web-smart-icon-line--feature {
  --smart-line-accent: #db2777;
  --smart-line-ink: #9d285f;
  --smart-line-soft: #fff3f8;
}

.web-book-content.web-smart-content .web-smart-icon-line .web-smart-line-body {
  color: var(--smart-line-ink);
}

.web-book-content.web-smart-content .web-smart-arrow-line .web-smart-line-body {
  color: #145ca1;
  font-style: italic;
  font-weight: 700;
}

.web-book-content.web-smart-content .web-smart-icon-line.web-smart-feature-line {
  margin-top: 7px !important;
  margin-bottom: 7px !important;
  padding: 8px 10px;
  background: linear-gradient(135deg, var(--smart-line-soft), #fff);
  border: 1px solid color-mix(in srgb, var(--smart-line-accent) 27%, #fff);
  border-left: 4px solid var(--smart-line-accent);
  border-radius: 11px;
  box-shadow: 0 5px 13px color-mix(in srgb, var(--smart-line-accent) 9%, transparent);
}

.web-book-content.web-smart-content .web-smart-heading-line {
  --smart-heading-accent: #7c3aed;
  --smart-heading-ink: #5b3aa5;
  position: relative;
  margin-top: 8px !important;
  margin-bottom: 5px !important;
  padding: 7px 10px 7px 13px;
  color: var(--smart-heading-ink);
  background: linear-gradient(100deg, color-mix(in srgb, var(--smart-heading-accent) 10%, #fff), rgba(255, 255, 255, .78));
  border: 1px solid color-mix(in srgb, var(--smart-heading-accent) 22%, #fff);
  border-left: 4px solid var(--smart-heading-accent);
  border-radius: 10px;
  box-shadow: 0 5px 13px color-mix(in srgb, var(--smart-heading-accent) 8%, transparent);
  font-weight: 800;
  line-height: 1.5;
}

.web-book-content.web-smart-content .web-smart-heading-line.web-smart-icon-line {
  padding: 7px 10px 7px 8px;
}

.web-book-content.web-smart-content .web-smart-heading-line:not(.web-smart-icon-line)::before {
  display: inline-grid;
  width: 24px;
  height: 24px;
  margin-right: 7px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--smart-heading-accent), #2563eb);
  border-radius: 7px;
  content: "✦";
  font-size: 12px;
  vertical-align: -5px;
}

.web-book-content.web-smart-content .web-smart-heading-line[data-content-tone="1"] {
  --smart-heading-accent: #168bd0;
  --smart-heading-ink: #155e8c;
}

.web-book-content.web-smart-content .web-smart-heading-line[data-content-tone="2"] {
  --smart-heading-accent: #7654d8;
  --smart-heading-ink: #5540a2;
}

.web-book-content.web-smart-content .web-smart-heading-line[data-content-tone="3"] {
  --smart-heading-accent: #e28a25;
  --smart-heading-ink: #9a5a10;
}

.web-book-content.web-smart-content .web-smart-heading-line[data-content-tone="4"] {
  --smart-heading-accent: #1ca477;
  --smart-heading-ink: #167353;
}

.web-book-content.web-smart-content .web-smart-heading-line[data-content-tone="5"] {
  --smart-heading-accent: #e05c78;
  --smart-heading-ink: #a23d58;
}

.web-book-content.web-smart-content .web-smart-heading-line[data-content-tone="6"] {
  --smart-heading-accent: #4d73d8;
  --smart-heading-ink: #3454a8;
}

.web-book-content.web-smart-content .web-smart-label {
  font-weight: 900;
}

.web-book-content.web-smart-content .web-smart-label--tone-1,
.web-book-content.web-smart-content .web-smart-token--tone-1 {
  color: #c026d3;
}

.web-book-content.web-smart-content .web-smart-label--tone-2,
.web-book-content.web-smart-content .web-smart-token--tone-2 {
  color: #2563eb;
}

.web-book-content.web-smart-content .web-smart-label--tone-3,
.web-book-content.web-smart-content .web-smart-token--tone-3 {
  color: #ea580c;
}

.web-book-content.web-smart-content .web-smart-label--tone-4,
.web-book-content.web-smart-content .web-smart-token--tone-4 {
  color: #7c3aed;
}

.web-book-content.web-smart-content .web-smart-label--tone-5,
.web-book-content.web-smart-content .web-smart-token--tone-5 {
  color: #0f766e;
}

.web-book-content.web-smart-content .web-smart-label--tone-6,
.web-book-content.web-smart-content .web-smart-token--tone-6 {
  color: #4f46e5;
}

.web-book-content.web-smart-content .web-smart-token {
  font-weight: 900;
}

.web-book-content.web-smart-content .web-smart-token--quote {
  padding: 1px 4px;
  color: #9333ea;
  background: #f5f0ff;
  border-radius: 5px;
}

.web-book-content.web-smart-content .web-content-table,
.web-book-content.web-smart-content table {
  margin-top: 8px;
  margin-bottom: 10px;
}

.web-book-content.web-smart-content .web-mcq-card {
  margin-top: 12px;
  margin-bottom: 16px;
}

.web-book-content.web-smart-content .web-mcq-options {
  gap: 7px;
  padding: 10px 12px 4px;
}

.web-book-content.web-smart-content .web-mcq-option {
  padding: 8px 10px;
  line-height: 1.6;
}

.web-book-content.web-smart-content .web-mcq-answer,
.web-book-content.web-smart-content .web-mcq-explanation,
.web-book-content.web-smart-content .web-mcq-explanation-text {
  margin-top: 7px;
  line-height: 1.68;
}

.web-book-content.web-smart-content .web-mcq-card > :last-child {
  margin-bottom: 10px;
}

@media (max-width: 640px) {
  .web-book-content.web-smart-content {
    line-height: 1.68;
  }

  .web-book-content.web-smart-content > p,
  .web-book-content.web-smart-content > .web-smart-plain-line {
    margin-bottom: 5px !important;
  }

  .web-book-content.web-smart-content .web-smart-icon-line {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 7px;
    margin-bottom: 4px !important;
  }

  .web-book-content.web-smart-content .web-smart-symbol {
    width: 27px;
    min-height: 27px;
  }

  .web-book-content.web-smart-content .web-smart-feature-line {
    padding: 7px 8px;
  }
}

@media print {
  .web-book-content.web-smart-content .web-smart-feature-line,
  .web-book-content.web-smart-content .web-mcq-card {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* Deterministic Markdown/book components ---------------------------------- */
/*
 * These components are intentionally scoped to .web-smart-content. They
 * present the author's existing HTML/text; they do not replace the content
 * with an image or require an external renderer/API.
 */
.web-book-content.web-smart-content .web-markdown-title {
  --book-accent: #6d3aa8;
  --book-ink: #fff;
  --book-soft: #4f2d82;
  display: block;
  margin: 0 0 24px;
  padding: clamp(16px, 3vw, 26px) clamp(18px, 4vw, 38px);
  color: var(--book-ink);
  background: linear-gradient(135deg, var(--book-soft), var(--book-accent));
  border: 1px solid color-mix(in srgb, var(--book-accent) 55%, #fff);
  border-radius: 16px;
  box-shadow: 0 12px 25px color-mix(in srgb, var(--book-accent) 17%, transparent);
  font-size: clamp(1.45em, 3.3vw, 2.05em);
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.web-book-content.web-smart-content .web-markdown-title.web-smart-icon-line {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  text-align: left;
}

.web-book-content.web-smart-content .web-markdown-title .web-smart-symbol {
  width: 46px;
  min-height: 46px;
  color: #fff;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .35);
  box-shadow: none;
  font-size: 23px;
}

.web-book-content.web-smart-content .web-markdown-title .web-smart-line-body {
  color: inherit;
}

.web-book-content.web-smart-content .web-markdown-title[data-content-tone="1"] {
  --book-accent: #286fa7;
  --book-soft: #244c86;
}

.web-book-content.web-smart-content .web-markdown-title[data-content-tone="2"] {
  --book-accent: #7654d8;
  --book-soft: #4d307f;
}

.web-book-content.web-smart-content .web-markdown-title[data-content-tone="3"] {
  --book-accent: #d47c23;
  --book-soft: #9a4b19;
}

.web-book-content.web-smart-content .web-major-section {
  --book-accent: #2876ad;
  --book-ink: #1d5d88;
  --book-soft: #edf8ff;
  margin: 24px 0 12px;
  padding: 12px 16px;
  color: var(--book-ink);
  background: linear-gradient(100deg, var(--book-soft), rgba(255, 255, 255, .82));
  border: 1px solid color-mix(in srgb, var(--book-accent) 27%, #fff);
  border-left: 6px solid var(--book-accent);
  border-radius: 13px;
  box-shadow: 0 7px 16px color-mix(in srgb, var(--book-accent) 9%, transparent);
  font-size: clamp(1.18em, 2.6vw, 1.55em);
  font-weight: 800;
  line-height: 1.4;
}

.web-book-content.web-smart-content .web-major-section[data-content-tone="1"] {
  --book-accent: #168bd0;
  --book-ink: #155e8c;
  --book-soft: #eaf8ff;
}

.web-book-content.web-smart-content .web-major-section[data-content-tone="2"] {
  --book-accent: #7654d8;
  --book-ink: #5540a2;
  --book-soft: #f3efff;
}

.web-book-content.web-smart-content .web-major-section[data-content-tone="3"] {
  --book-accent: #e28a25;
  --book-ink: #9a5a10;
  --book-soft: #fff6e7;
}

.web-book-content.web-smart-content .web-major-section[data-content-tone="4"] {
  --book-accent: #1ca477;
  --book-ink: #167353;
  --book-soft: #eafbf5;
}

.web-book-content.web-smart-content .web-major-section[data-content-tone="5"] {
  --book-accent: #e05c78;
  --book-ink: #a23d58;
  --book-soft: #fff0f4;
}

.web-book-content.web-smart-content .web-major-section[data-content-tone="6"] {
  --book-accent: #4d73d8;
  --book-ink: #3454a8;
  --book-soft: #eef2ff;
}

.web-book-content.web-smart-content .web-major-section.web-smart-icon-line {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding-left: 10px;
}

.web-book-content.web-smart-content .web-major-section.web-smart-section-line.web-smart-icon-line--success {
  --book-accent: #218653;
  --book-ink: #176b4d;
  --book-soft: #eefaf2;
}

.web-book-content.web-smart-content .web-major-section.web-smart-section-line.web-smart-icon-line--orange {
  --book-accent: #dd741d;
  --book-ink: #9a4d13;
  --book-soft: #fff5e9;
}

.web-book-content.web-smart-content .web-major-section.web-smart-section-line.web-smart-icon-line--info {
  --book-accent: #287bd1;
  --book-ink: #155e8c;
  --book-soft: #edf6ff;
}

.web-book-content.web-smart-content .web-major-section .web-smart-symbol {
  width: 34px;
  min-height: 34px;
  background: var(--book-accent);
  box-shadow: 0 5px 12px color-mix(in srgb, var(--book-accent) 18%, transparent);
  font-size: 17px;
}

.web-book-content.web-smart-content .web-subsection-heading {
  --sub-accent: #7654d8;
  --sub-ink: #5540a2;
  margin: 17px 0 7px;
  padding: 7px 0 6px;
  color: var(--sub-ink);
  background: transparent;
  border: 0;
  border-bottom: 2px solid color-mix(in srgb, var(--sub-accent) 24%, #fff);
  border-radius: 0;
  box-shadow: none;
  font-size: 1.08em;
  font-weight: 800;
  line-height: 1.5;
}

.web-book-content.web-smart-content .web-subsection-heading[data-content-tone="1"] {
  --sub-accent: #168bd0;
  --sub-ink: #155e8c;
}

.web-book-content.web-smart-content .web-subsection-heading[data-content-tone="2"] {
  --sub-accent: #7654d8;
  --sub-ink: #5540a2;
}

.web-book-content.web-smart-content .web-subsection-heading[data-content-tone="3"] {
  --sub-accent: #e28a25;
  --sub-ink: #9a5a10;
}

.web-book-content.web-smart-content .web-subsection-heading[data-content-tone="4"] {
  --sub-accent: #1ca477;
  --sub-ink: #167353;
}

.web-book-content.web-smart-content .web-subsection-heading[data-content-tone="5"] {
  --sub-accent: #e05c78;
  --sub-ink: #a23d58;
}

.web-book-content.web-smart-content .web-subsection-heading[data-content-tone="6"] {
  --sub-accent: #4d73d8;
  --sub-ink: #3454a8;
}

.web-book-content.web-smart-content .web-subsection-heading.web-smart-icon-line {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 10px 7px 7px;
  background: color-mix(in srgb, var(--sub-accent) 6%, #fff);
  border: 1px solid color-mix(in srgb, var(--sub-accent) 20%, #fff);
  border-left: 4px solid var(--sub-accent);
  border-radius: 10px;
}

.web-book-content.web-smart-content .web-subsection-heading .web-smart-symbol {
  width: 27px;
  min-height: 27px;
  background: var(--sub-accent);
  box-shadow: none;
  font-size: 13px;
}

.web-book-content.web-smart-content .web-markdown-quote {
  position: relative;
  margin: 18px 0;
  padding: 18px 22px 17px 42px;
  color: #513b76;
  background: #faf5ff;
  border: 1px solid #e5d5f4;
  border-left: 5px solid #8a5acb;
  border-radius: 13px;
  box-shadow: 0 7px 15px rgba(111, 77, 155, .08);
  font-size: 1.04em;
  line-height: 1.8;
}

.web-book-content.web-smart-content .web-markdown-quote::before {
  position: absolute;
  top: 6px;
  left: 13px;
  color: #a36bd2;
  content: "❝";
  font-family: Georgia, serif;
  font-size: 31px;
  line-height: 1;
}

.web-book-content.web-smart-content .web-markdown-quote-source {
  margin-top: 9px;
  color: #7b6d91;
  font-size: .9em;
  font-style: normal;
  text-align: right;
}

.web-book-content.web-smart-content .web-markdown-divider {
  height: 1px;
  margin: 21px 0;
  border: 0;
  background: linear-gradient(90deg, transparent, #d6b879 18%, #e8d9b7 50%, #d6b879 82%, transparent);
}

.web-book-content.web-smart-content .web-markdown-strong {
  color: #a0437a;
  font-weight: 900;
}

.web-book-content.web-smart-content .web-markdown-title .web-markdown-strong {
  color: inherit;
}

.web-book-content.web-smart-content .web-markdown-emphasis {
  color: #5d6594;
}

.web-book-content.web-smart-content .web-smart-callout {
  --callout-accent: #d18a20;
  --callout-ink: #7d5317;
  --callout-soft: #fff8e5;
  margin: 15px 0;
  padding: 11px 15px 10px;
  color: var(--callout-ink);
  background: var(--callout-soft);
  border: 1px solid color-mix(in srgb, var(--callout-accent) 25%, #fff);
  border-left: 5px solid var(--callout-accent);
  border-radius: 12px;
  box-shadow: 0 7px 16px color-mix(in srgb, var(--callout-accent) 8%, transparent);
}

.web-book-content.web-smart-content .web-smart-callout--important {
  --callout-accent: #cf8a20;
  --callout-ink: #7d5317;
  --callout-soft: #fff8e5;
}

.web-book-content.web-smart-content .web-smart-callout--example {
  --callout-accent: #208d9b;
  --callout-ink: #17616b;
  --callout-soft: #edfbfc;
}

.web-book-content.web-smart-content .web-smart-callout--note {
  --callout-accent: #7654d8;
  --callout-ink: #5540a2;
  --callout-soft: #f6f2ff;
}

.web-book-content.web-smart-content .web-smart-callout--warning {
  --callout-accent: #d95f2d;
  --callout-ink: #93401f;
  --callout-soft: #fff3ed;
}

.web-book-content.web-smart-content .web-smart-callout-label {
  margin: 0 0 5px !important;
  color: var(--callout-ink);
  font-weight: 900;
  line-height: 1.55;
}

.web-book-content.web-smart-content .web-smart-callout-label:not(.web-smart-icon-line)::before {
  margin-right: 6px;
  color: var(--callout-accent);
  content: "✦";
  font-weight: 900;
}

.web-book-content.web-smart-content .web-smart-callout--example .web-smart-callout-label:not(.web-smart-icon-line)::before {
  content: "💡";
}

.web-book-content.web-smart-content .web-smart-callout--note .web-smart-callout-label:not(.web-smart-icon-line)::before {
  content: "📌";
}

.web-book-content.web-smart-content .web-smart-callout--warning .web-smart-callout-label:not(.web-smart-icon-line)::before {
  content: "⚠";
}

.web-book-content.web-smart-content .web-smart-callout-body {
  margin: 0 0 5px !important;
  color: inherit;
  line-height: 1.72;
}

.web-book-content.web-smart-content .web-smart-callout-body:last-child {
  margin-bottom: 0 !important;
}

.web-book-content.web-smart-content .web-period-range {
  display: table;
  width: fit-content;
  max-width: 100%;
  margin: 5px 0 8px !important;
  padding: 3px 11px;
  color: #255c8f;
  background: #edf6ff;
  border: 1px solid #c9e1f4;
  border-radius: 999px;
  font-weight: 900;
  line-height: 1.5;
}

.web-book-content.web-smart-content .web-era-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 22px;
}

.web-book-content.web-smart-content .web-era-card {
  --era-accent: #27835a;
  --era-ink: #176b4d;
  --era-soft: #effaf3;
  min-width: 0;
  padding: 12px 13px 11px;
  background: var(--era-soft);
  border: 1px solid color-mix(in srgb, var(--era-accent) 27%, #fff);
  border-top: 4px solid var(--era-accent);
  border-radius: 13px;
  box-shadow: 0 7px 15px color-mix(in srgb, var(--era-accent) 9%, transparent);
}

.web-book-content.web-smart-content .web-era-card[data-era-tone="1"] {
  --era-accent: #27835a;
  --era-ink: #176b4d;
  --era-soft: #effaf3;
}

.web-book-content.web-smart-content .web-era-card[data-era-tone="2"] {
  --era-accent: #d47d20;
  --era-ink: #8b5314;
  --era-soft: #fff8e9;
}

.web-book-content.web-smart-content .web-era-card[data-era-tone="3"] {
  --era-accent: #2676bb;
  --era-ink: #155e8c;
  --era-soft: #eef8ff;
}

.web-book-content.web-smart-content .web-era-card[data-era-tone="4"] {
  --era-accent: #7654d8;
  --era-ink: #5540a2;
  --era-soft: #f6f2ff;
}

.web-book-content.web-smart-content .web-era-card[data-era-tone="5"] {
  --era-accent: #d85b78;
  --era-ink: #9d3b56;
  --era-soft: #fff2f5;
}

.web-book-content.web-smart-content .web-era-card > .web-content-heading {
  display: block;
  margin: 0 0 7px !important;
  padding: 0 0 6px !important;
  color: var(--era-ink) !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid color-mix(in srgb, var(--era-accent) 23%, #fff) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 1.04em;
}

.web-book-content.web-smart-content .web-era-card > .web-content-heading.web-smart-icon-line {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
}

.web-book-content.web-smart-content .web-era-card .web-smart-symbol {
  width: 27px;
  min-height: 27px;
  background: var(--era-accent);
  box-shadow: none;
  font-size: 13px;
}

.web-book-content.web-smart-content .web-era-card .web-period-range {
  color: var(--era-ink);
  background: rgba(255, 255, 255, .72);
  border-color: color-mix(in srgb, var(--era-accent) 30%, #fff);
}

.web-book-content.web-smart-content .web-smart-list-rendered {
  margin-top: 8px !important;
  margin-bottom: 13px !important;
}

.web-book-content.web-smart-content .web-smart-normal-list {
  padding-left: 1.65em;
}

.web-book-content.web-smart-content .web-smart-list--alphabetical {
  padding-left: 0;
  list-style: none;
}

.web-book-content.web-smart-content .web-smart-list--alphabetical li {
  margin: 2px 0;
  line-height: 1.7;
}

.web-book-content.web-smart-content .web-smart-normal-list li {
  margin: 2px 0;
  line-height: 1.7;
}

.web-book-content.web-smart-content .web-smart-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 10px;
  padding-left: 0;
  list-style: none;
  counter-reset: web-timeline;
}

.web-book-content.web-smart-content .web-smart-timeline > li {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 11px 12px 11px 41px;
  color: #31536e;
  background: #fff;
  border: 1px solid #dce8ef;
  border-left: 4px solid #4b8fc2;
  border-radius: 10px;
  line-height: 1.65;
  counter-increment: web-timeline;
}

.web-book-content.web-smart-content .web-smart-timeline > li::before {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  color: #fff;
  background: #4b8fc2;
  border-radius: 50%;
  content: counter(web-timeline);
  font-size: 12px;
  font-weight: 900;
}

.web-book-content.web-smart-content .web-smart-timeline .web-smart-token {
  color: #a45e18;
}

.web-book-content.web-smart-content .web-book-content img,
.web-book-content.web-smart-content img,
.web-feature-image {
  box-shadow: 0 9px 21px rgba(38, 61, 80, .12);
}

.web-book-content.web-smart-content img:focus-visible,
.web-feature-image:focus-visible {
  outline: 3px solid #5d91c4;
  outline-offset: 3px;
}

.web-image-lightbox[hidden] {
  display: none;
}

.web-image-lightbox {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 28, 43, .84);
  opacity: 0;
  transition: opacity .18s ease;
}

.web-image-lightbox.is-open {
  opacity: 1;
}

.web-image-lightbox__dialog {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: min(1180px, 96vw);
  max-height: 94vh;
  overflow: auto;
  padding: 48px 18px 14px;
  background: #fffdf8;
  border: 1px solid #eadfc9;
  border-radius: 16px;
  box-shadow: 0 25px 65px rgba(0, 0, 0, .28);
}

.web-image-lightbox__close,
.web-image-lightbox__toolbar button,
.web-image-lightbox__nav {
  border: 0;
  cursor: pointer;
}

.web-image-lightbox__close {
  position: absolute;
  top: 9px;
  right: 11px;
  width: 34px;
  height: 34px;
  color: #536277;
  background: #f4f0e8;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}

.web-image-lightbox__toolbar {
  position: absolute;
  top: 12px;
  left: 17px;
  display: flex;
  gap: 4px;
}

.web-image-lightbox__toolbar button {
  min-width: 30px;
  min-height: 28px;
  padding: 3px 8px;
  color: #40546c;
  background: #f4f7fa;
  border: 1px solid #dce6ee;
  border-radius: 7px;
  font-size: 13px;
}

.web-image-lightbox__nav {
  align-self: center;
  width: 34px;
  height: 48px;
  color: #fff;
  background: #286fa7;
  border-radius: 9px;
  font-size: 32px;
  line-height: 1;
}

.web-image-lightbox__nav--previous {
  grid-column: 1;
  grid-row: 2;
}

.web-image-lightbox__nav--next {
  grid-column: 3;
  grid-row: 2;
}

.web-image-lightbox__image {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
  width: auto;
  max-width: min(82vw, 1030px);
  max-height: 76vh;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform .18s ease;
}

.web-image-lightbox__image.is-zoomed {
  cursor: zoom-out;
}

.web-image-lightbox__caption {
  grid-column: 1 / -1;
  grid-row: 3;
  min-height: 1.2em;
  margin: 11px auto 0;
  color: #52657e;
  font-size: 13px;
  text-align: center;
}

.web-image-lightbox__counter {
  grid-column: 1 / -1;
  grid-row: 4;
  margin-top: 3px;
  color: #8793a1;
  font-size: 12px;
  text-align: center;
}

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

@media (max-width: 760px) {
  .web-book-content.web-smart-content .web-era-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .web-book-content.web-smart-content .web-major-section {
    margin-top: 19px;
    padding: 10px 12px;
  }

  .web-book-content.web-smart-content .web-markdown-title.web-smart-icon-line {
    grid-template-columns: 39px minmax(0, 1fr);
    gap: 9px;
    padding: 15px 14px;
  }

  .web-book-content.web-smart-content .web-markdown-title .web-smart-symbol {
    width: 37px;
    min-height: 37px;
    font-size: 19px;
  }

  .web-book-content.web-smart-content .web-smart-timeline {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-left: 4px;
    padding-left: 11px;
    border-left: 2px solid #b9d5e8;
  }

  .web-book-content.web-smart-content .web-smart-timeline > li {
    padding-left: 39px;
  }

  .web-image-lightbox {
    padding: 8px;
  }

  .web-image-lightbox__dialog {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    width: 98vw;
    padding: 48px 7px 12px;
    border-radius: 12px;
  }

  .web-image-lightbox__nav {
    width: 29px;
    height: 42px;
    font-size: 27px;
  }

  .web-image-lightbox__image {
    max-width: 82vw;
    max-height: 72vh;
  }
}

@media print {
  .web-image-lightbox {
    display: none !important;
  }

  .web-book-content.web-smart-content .web-markdown-title,
  .web-book-content.web-smart-content .web-smart-callout,
  .web-book-content.web-smart-content .web-era-card,
  .web-book-content.web-smart-content .web-smart-timeline > li {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* Final compact pass ------------------------------------------------------ */
/*
 * Normal lecture text stays in a continuous reading flow. Only the main
 * title keeps the large book-plate treatment; section headings and ordinary
 * paragraphs do not create oversized vertical gaps.
 */
.web-book-content.web-smart-content {
  line-height: 1.55;
}

.web-book-content.web-smart-content > p,
.web-book-content.web-smart-content > .web-smart-plain-line {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.55;
}

.web-book-content.web-smart-content > .web-major-section:not(.web-markdown-title),
.web-book-content.web-smart-content > h1.web-content-heading:not(.web-markdown-title),
.web-book-content.web-smart-content > h2.web-content-heading:not(.web-markdown-title) {
  margin: 9px 0 4px !important;
  padding: 6px 10px 6px 12px !important;
  border-radius: 9px;
  line-height: 1.34;
}

.web-book-content.web-smart-content > .web-subsection-heading {
  margin: 7px 0 3px !important;
  padding: 4px 0 3px !important;
  line-height: 1.42;
}

.web-book-content.web-smart-content .web-markdown-title {
  margin: 0 0 10px !important;
  padding: 13px 17px !important;
  line-height: 1.3;
}

.web-book-content.web-smart-content .web-smart-icon-line {
  margin-bottom: 2px !important;
  line-height: 1.52;
}

.web-book-content.web-smart-content .web-smart-icon-line.web-smart-feature-line,
.web-book-content.web-smart-content .web-auto-callout {
  margin-top: 4px !important;
  margin-bottom: 4px !important;
}

.web-book-content.web-smart-content .web-period-range {
  margin-top: 2px !important;
  margin-bottom: 3px !important;
}

.web-book-content.web-smart-content .web-era-grid {
  gap: 8px;
  margin: 8px 0 10px;
}

/* The detail page already has the book title below. Remove the duplicate
 * large hero block so the reading area starts near the top of the page. */
.web-detail-hero {
  display: none !important;
}

.web-reader-page {
  padding-top: 12px !important;
}

.web-book-page {
  padding-top: 16px;
}

.web-book-breadcrumb {
  margin-bottom: 10px;
}

.web-book-header {
  padding-bottom: 10px;
}

/* Colorful, readable table treatment. The blank-column class is applied by
 * JS only when every cell in that column is empty; table data is preserved. */
.web-book-content.web-smart-content .web-smart-table,
.web-book-content.web-smart-content .web-content-table {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 7px 0 9px !important;
  overflow-x: auto;
  border: 1px solid #cbdfea;
  border-radius: 12px;
  border-spacing: 0;
  background: #fff;
  box-shadow: 0 6px 16px rgba(36, 86, 119, .08);
  table-layout: auto;
}

.web-book-content.web-smart-content .web-smart-table th,
.web-book-content.web-smart-content .web-smart-table td,
.web-book-content.web-smart-content .web-content-table th,
.web-book-content.web-smart-content .web-content-table td {
  min-width: 0;
  padding: 7px 10px;
  color: #314b66;
  border: 1px solid #d5e3ec;
  vertical-align: middle;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.web-book-content.web-smart-content .web-smart-table thead th,
.web-book-content.web-smart-content .web-smart-table .web-table-header-row th,
.web-book-content.web-smart-content .web-content-table thead th {
  color: #fff;
  background: linear-gradient(135deg, #176ca6 0%, #5e4bc6 100%);
  border-color: #4d79b7;
  font-weight: 800;
  text-align: center;
}

.web-book-content.web-smart-content .web-smart-table tbody tr:nth-child(odd) td,
.web-book-content.web-smart-content .web-content-table tbody tr:nth-child(odd) td {
  background: #f8fcff;
}

.web-book-content.web-smart-content .web-smart-table tbody tr:nth-child(even) td,
.web-book-content.web-smart-content .web-content-table tbody tr:nth-child(even) td {
  background: #eef7ff;
}

.web-book-content.web-smart-content .web-smart-table tbody tr:hover td,
.web-book-content.web-smart-content .web-content-table tbody tr:hover td {
  background: #fff7e6;
}

.web-book-content.web-smart-content .web-smart-table tbody td:first-child,
.web-book-content.web-smart-content .web-content-table tbody td:first-child {
  color: #245a88;
  background: #edf7ff;
  font-weight: 700;
}

.web-book-content.web-smart-content .web-smart-table tbody td:nth-child(2),
.web-book-content.web-smart-content .web-content-table tbody td:nth-child(2) {
  color: #8b5a18;
  font-weight: 700;
}

.web-book-content.web-smart-content .web-table-empty-column {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  padding: 0 !important;
  border-width: 0 !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

@media (max-width: 640px) {
  .web-book-content.web-smart-content {
    line-height: 1.5;
  }

  .web-book-content.web-smart-content > p,
  .web-book-content.web-smart-content > .web-smart-plain-line {
    line-height: 1.5;
  }

  .web-book-content.web-smart-content .web-smart-table th,
  .web-book-content.web-smart-content .web-smart-table td,
  .web-book-content.web-smart-content .web-content-table th,
  .web-book-content.web-smart-content .web-content-table td {
    padding: 6px 8px;
    font-size: .9em;
  }
}

/* Universal content-aware layout pass ------------------------------------ */
/*
 * These components are created only when the stored lecture has a clear,
 * short semantic pattern. Long prose, normal lists, calculations and
 * uncertain content continue in the normal full-width reading flow.
 */
.web-book-content.web-smart-content .web-fact-grid,
.web-book-content.web-smart-content .web-related-grid,
.web-book-content.web-smart-content .web-mcq-grid {
  min-width: 0;
  align-items: stretch;
}

.web-book-content.web-smart-content .web-fact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 10px;
}

.web-book-content.web-smart-content .web-fact-card {
  --fact-accent: #2676bb;
  --fact-ink: #235c88;
  --fact-soft: #f0f8ff;
  min-width: 0;
  margin: 0;
  padding: 8px 10px;
  color: var(--fact-ink);
  background: linear-gradient(145deg, var(--fact-soft), #fff);
  border: 1px solid color-mix(in srgb, var(--fact-accent) 24%, #fff);
  border-top: 3px solid var(--fact-accent);
  border-radius: 10px;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--fact-accent) 8%, transparent);
}

.web-book-content.web-smart-content .web-fact-card[data-fact-tone="1"],
.web-book-content.web-smart-content .web-related-card[data-related-tone="1"] {
  --fact-accent: #2676bb;
  --fact-ink: #235c88;
  --fact-soft: #f0f8ff;
}

.web-book-content.web-smart-content .web-fact-card[data-fact-tone="2"],
.web-book-content.web-smart-content .web-related-card[data-related-tone="2"] {
  --fact-accent: #7654d8;
  --fact-ink: #58439d;
  --fact-soft: #f7f3ff;
}

.web-book-content.web-smart-content .web-fact-card[data-fact-tone="3"],
.web-book-content.web-smart-content .web-related-card[data-related-tone="3"] {
  --fact-accent: #d47d20;
  --fact-ink: #8b5418;
  --fact-soft: #fff8e9;
}

.web-book-content.web-smart-content .web-fact-card[data-fact-tone="4"],
.web-book-content.web-smart-content .web-related-card[data-related-tone="4"] {
  --fact-accent: #1c9a79;
  --fact-ink: #176b59;
  --fact-soft: #effcf8;
}

.web-book-content.web-smart-content .web-fact-card[data-fact-tone="5"],
.web-book-content.web-smart-content .web-related-card[data-related-tone="5"] {
  --fact-accent: #d85b78;
  --fact-ink: #963d58;
  --fact-soft: #fff3f6;
}

.web-book-content.web-smart-content .web-fact-card[data-fact-tone="6"],
.web-book-content.web-smart-content .web-related-card[data-related-tone="6"] {
  --fact-accent: #4d73d8;
  --fact-ink: #3454a8;
  --fact-soft: #f1f5ff;
}

.web-book-content.web-smart-content .web-fact-card > .web-smart-plain-line,
.web-book-content.web-smart-content .web-related-card > .web-smart-plain-line {
  margin: 0 !important;
  padding: 0 !important;
  color: inherit;
  line-height: 1.5;
}

.web-book-content.web-smart-content .web-fact-card .web-smart-label {
  color: var(--fact-ink);
}

.web-book-content.web-smart-content .web-fact-card > .web-smart-heading-line {
  display: block;
  margin: 0 0 2px !important;
  padding: 0 !important;
  color: var(--fact-ink) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: .9em !important;
  font-weight: 900;
  line-height: 1.35 !important;
}

.web-book-content.web-smart-content .web-fact-card > .web-smart-heading-line::before {
  display: none;
}

.web-book-content.web-smart-content .web-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 9px;
  margin: 8px 0 11px;
}

.web-book-content.web-smart-content .web-related-card {
  --fact-accent: #2676bb;
  --fact-ink: #235c88;
  --fact-soft: #f0f8ff;
  min-width: 0;
  margin: 0;
  padding: 9px 10px 10px;
  color: var(--fact-ink);
  background: linear-gradient(145deg, var(--fact-soft), #fff);
  border: 1px solid color-mix(in srgb, var(--fact-accent) 24%, #fff);
  border-top: 3px solid var(--fact-accent);
  border-radius: 11px;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--fact-accent) 8%, transparent);
}

.web-book-content.web-smart-content .web-related-card > .web-content-heading {
  display: block;
  margin: 0 0 5px !important;
  padding: 0 0 5px !important;
  color: var(--fact-ink) !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid color-mix(in srgb, var(--fact-accent) 22%, #fff) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 1.08em !important;
  line-height: 1.35 !important;
}

.web-book-content.web-smart-content .web-related-card > .web-content-heading.web-smart-icon-line {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  padding: 0 0 5px !important;
}

.web-book-content.web-smart-content .web-related-card .web-smart-symbol {
  width: 24px;
  min-height: 24px;
  background: linear-gradient(135deg, var(--fact-accent), #7257d8);
  box-shadow: none;
  font-size: 12px;
}

.web-book-content.web-smart-content .web-related-card .web-smart-token,
.web-book-content.web-smart-content .web-related-card .web-smart-label {
  color: var(--fact-ink);
}

.web-book-content.web-smart-content .web-formula-line {
  display: block;
  margin: 5px 0 !important;
  padding: 7px 10px !important;
  color: #244f87;
  background: linear-gradient(100deg, #eef7ff, #f7f3ff 72%, #fff);
  border: 1px solid #cddff2;
  border-left: 4px solid #4f73d8;
  border-radius: 9px;
  font-weight: 800;
  line-height: 1.55;
}

.web-book-content.web-smart-content .web-math-solution-line:not(.web-smart-icon-line) {
  display: block;
  margin: 0 !important;
  padding: 2px 0 2px 12px !important;
  color: #405c79;
  border-left: 3px dotted #8aaed0;
  line-height: 1.55;
}

.web-book-content.web-smart-content .web-mcq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 9px 0 11px;
}

.web-book-content.web-smart-content .web-mcq-grid > .web-mcq-card {
  min-width: 0;
  height: 100%;
  margin: 0 !important;
}

.web-book-content.web-smart-content .web-mcq-grid > .web-mcq-card > :last-child {
  margin-bottom: 0 !important;
}

.web-book-content.web-smart-content .web-smart-toc {
  margin: 0 0 10px;
  color: #35526f;
  background: linear-gradient(110deg, #f2f8ff, #faf7ff);
  border: 1px solid #d7e4f0;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(50, 88, 120, .06);
}

.web-book-content.web-smart-content .web-smart-toc summary {
  padding: 7px 10px;
  color: #315b91;
  cursor: pointer;
  font-size: .92em;
  font-weight: 800;
  list-style-position: inside;
}

.web-book-content.web-smart-content .web-smart-toc summary::marker {
  color: #7654d8;
}

.web-book-content.web-smart-content .web-smart-toc nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 5px;
  padding: 0 8px 8px;
}

.web-book-content.web-smart-content .web-smart-toc a {
  min-width: 0;
  overflow: hidden;
  padding: 5px 7px;
  color: #496581;
  background: rgba(255, 255, 255, .76);
  border: 1px solid #e0e9f1;
  border-radius: 7px;
  font-size: .82em;
  line-height: 1.35;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-book-content.web-smart-content .web-smart-toc a:hover,
.web-book-content.web-smart-content .web-smart-toc a:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, #2676bb, #7654d8);
  border-color: transparent;
}

.web-book-content.web-smart-content .web-smart-toc a.is-subsection {
  padding-left: 15px;
  color: #6a6c91;
}

.web-book-content.web-smart-content .web-table-narrow-column {
  width: 1% !important;
  min-width: 3.4em !important;
  white-space: nowrap;
}

@media (min-width: 1200px) {
  .web-book-content.web-smart-content .web-mcq-grid--dense {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .web-book-content.web-smart-content .web-fact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .web-book-content.web-smart-content .web-fact-grid,
  .web-book-content.web-smart-content .web-mcq-grid {
    grid-template-columns: 1fr;
  }

  .web-book-content.web-smart-content .web-related-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .web-book-content.web-smart-content .web-smart-toc nav {
    grid-template-columns: 1fr;
  }
}

@media print {
  .web-book-content.web-smart-content .web-smart-toc {
    display: none;
  }

  .web-book-content.web-smart-content .web-fact-card,
  .web-book-content.web-smart-content .web-related-card,
  .web-book-content.web-smart-content .web-mcq-card,
  .web-book-content.web-smart-content .web-formula-line {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* Keep smart tables as tables; the wrapper owns responsive scrolling. */
.web-book-content.web-smart-content .web-smart-table-wrap {
  width: 100%;
  max-width: 100%;
  margin: 7px 0 9px;
  overflow-x: auto;
  border: 1px solid #cbdfea;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(36, 86, 119, .08);
}

.web-book-content.web-smart-content .web-smart-table-wrap > .web-smart-table,
.web-book-content.web-smart-content .web-smart-table-wrap > .web-content-table {
  display: table;
  width: 100%;
  min-width: 0;
  margin: 0 !important;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  border-collapse: separate;
  border-spacing: 0;
  overflow: visible;
}

.web-book-content.web-smart-content .web-fact-grid.web-fact-grid--dense {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.web-book-content.web-smart-content .web-fact-grid.web-fact-grid--balanced {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.web-book-content.web-smart-content .web-fact-card > p,
.web-book-content.web-smart-content .web-fact-card > div,
.web-book-content.web-smart-content .web-related-card > p,
.web-book-content.web-smart-content .web-related-card > div {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .web-book-content.web-smart-content .web-fact-grid,
  .web-book-content.web-smart-content .web-fact-grid.web-fact-grid--dense,
  .web-book-content.web-smart-content .web-fact-grid.web-fact-grid--balanced {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .web-book-content.web-smart-content .web-fact-grid,
  .web-book-content.web-smart-content .web-fact-grid.web-fact-grid--dense,
  .web-book-content.web-smart-content .web-fact-grid.web-fact-grid--balanced {
    grid-template-columns: 1fr;
  }
}

@media print {
  .web-book-content.web-smart-content .web-smart-table-wrap {
    overflow: visible;
    border-color: #cbdfea;
    box-shadow: none;
  }
}

/* Universal content-based chapter navigation ---------------------------- */
/*
 * The JavaScript fills this panel from the current lecture's headings and
 * semantic section lines. It is deliberately independent of subject names,
 * language and database IDs, so the same navigation works for Bangla,
 * English, General Knowledge, Mathematics and every future subject.
 */
.web-content-chapter-navigation {
  margin: 0 14px 13px;
  padding: 0 0 7px;
  border-top: 1px solid #e8eef4;
}

.web-content-chapter-navigation__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 7px;
  color: #243d60;
}

.web-content-chapter-navigation__header-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #2878cf, #7654d8);
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(76, 91, 193, .18);
  font-size: 13px;
}

.web-content-chapter-navigation__header div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.web-content-chapter-navigation__header strong {
  color: #243d60;
  font-size: 12px;
  line-height: 1.3;
}

.web-content-chapter-navigation__header small {
  overflow: hidden;
  color: #8a98a9;
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.web-content-chapter-navigation__links {
  display: grid;
  gap: 3px;
  max-height: min(56vh, 560px);
  padding: 0 1px 2px;
  overflow-y: auto;
  scrollbar-color: #abcce4 transparent;
  scrollbar-width: thin;
}

.web-content-chapter-navigation__links::-webkit-scrollbar {
  width: 5px;
}

.web-content-chapter-navigation__links::-webkit-scrollbar-thumb {
  background: #abcce4;
  border-radius: 999px;
}

.web-content-chapter-link {
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr);
  align-items: start;
  gap: 6px;
  min-width: 0;
  padding: 6px 7px;
  color: #536981;
  background: #fbfdff;
  border: 1px solid #e6eef5;
  border-left: 3px solid transparent;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.4;
  text-decoration: none;
  transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}

.web-content-chapter-link.is-subchapter {
  margin-left: 10px;
  padding-top: 5px;
  padding-bottom: 5px;
  color: #6c7890;
  background: #fff;
  font-size: 10.5px;
}

.web-content-chapter-link:hover,
.web-content-chapter-link:focus-visible,
.web-content-chapter-link.is-active {
  color: #165fa8;
  background: linear-gradient(100deg, #edf7ff, #f7f2ff);
  border-color: #cbdff0;
  border-left-color: #2878cf;
  outline: none;
}

.web-content-chapter-link.is-active {
  font-weight: 700;
  box-shadow: 0 3px 9px rgba(48, 104, 167, .08);
  transform: translateX(1px);
}

.web-content-chapter-link__icon {
  display: grid;
  width: 18px;
  min-height: 18px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #2b80d5, #7351d9);
  border-radius: 5px;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.web-content-chapter-link.is-subchapter .web-content-chapter-link__icon {
  width: 16px;
  min-height: 16px;
  color: #7654d8;
  background: #f0eaff;
  font-size: 11px;
}

.web-content-chapter-link[data-content-tone="2"] .web-content-chapter-link__icon {
  background: linear-gradient(135deg, #7654d8, #b34ec8);
}

.web-content-chapter-link[data-content-tone="3"] .web-content-chapter-link__icon {
  background: linear-gradient(135deg, #ea8b27, #d65342);
}

.web-content-chapter-link[data-content-tone="4"] .web-content-chapter-link__icon {
  background: linear-gradient(135deg, #1caa7b, #2774d0);
}

.web-content-chapter-link[data-content-tone="5"] .web-content-chapter-link__icon {
  background: linear-gradient(135deg, #df5e7d, #8b52d8);
}

.web-content-chapter-link__label {
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-overflow: ellipsis;
}

.web-book-content.web-smart-content h1[id],
.web-book-content.web-smart-content h2[id],
.web-book-content.web-smart-content h3[id],
.web-book-content.web-smart-content h4[id],
.web-book-content.web-smart-content h5[id],
.web-book-content.web-smart-content h6[id],
.web-book-content.web-smart-content .web-smart-heading-line[id] {
  scroll-margin-top: 96px;
}

@media (max-width: 760px) {
  .web-content-chapter-navigation {
    margin-left: 12px;
    margin-right: 12px;
  }

  .web-content-chapter-navigation__links {
    max-height: 42vh;
  }
}

@media print {
  .web-content-chapter-navigation {
    display: none;
  }
}

/* Final universal book composition ----------------------------------------
 * The renderer supplies the semantic classes; this pass keeps the page
 * compact and composes only related blocks side by side. It applies to every
 * public Website Lecture subject without using subject or lecture IDs.
 */
.web-reader-page {
  padding-top: 10px !important;
}

.web-reader-sidebar {
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  scrollbar-color: #b8d1e4 transparent;
  scrollbar-width: thin;
}

.web-reader-sidebar::-webkit-scrollbar {
  width: 6px;
}

.web-reader-sidebar::-webkit-scrollbar-thumb {
  background: #b8d1e4;
  border-radius: 999px;
}

.web-reader-lecture-list {
  max-height: 330px;
}

.web-book-page {
  padding: clamp(17px, 2.5vw, 30px);
}

.web-book-breadcrumb {
  margin-bottom: 8px;
}

.web-book-header,
.web-book-header.web-book-header--with-visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding-bottom: 12px;
}

.web-book-header.web-book-header--with-visual {
  grid-template-columns: minmax(0, 1fr) minmax(145px, 225px) auto;
}

.web-book-header-copy,
.web-book-visual,
.web-book-actions {
  min-width: 0;
}

.web-book-header-copy h2 {
  margin-top: 5px;
  line-height: 1.23;
}

.web-book-header-meta {
  margin: 7px 0 0;
  color: #75879a;
  font-size: 12px;
  line-height: 1.45;
}

.web-book-header-meta span {
  color: #d68a26;
  font-weight: 800;
}

.web-book-visual {
  display: grid;
  min-height: 76px;
  place-items: center;
}

.web-book-header .web-feature-image,
.web-book-header--with-visual .web-feature-image {
  display: block;
  width: min(225px, 100%);
  max-width: 100%;
  max-height: 148px;
  height: auto;
  margin: 0;
  border-radius: 12px;
  object-fit: contain;
}

.web-book-content.web-smart-content {
  font-size: 17px;
  line-height: 1.58;
}

.web-book-content.web-smart-content > p,
.web-book-content.web-smart-content > .web-smart-plain-line {
  line-height: 1.58;
}

/* Quote + important information form the compact introductory row only when
 * the parser has found both as adjacent, semantically safe blocks. */
.web-book-content.web-smart-content .web-intro-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(220px, .66fr);
  align-items: stretch;
  gap: 12px;
  margin: 11px 0 14px;
}

.web-book-content.web-smart-content .web-intro-card-grid > .web-markdown-quote,
.web-book-content.web-smart-content .web-intro-card-grid > .web-smart-callout {
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
  margin: 0 !important;
}

.web-book-content.web-smart-content .web-intro-card-grid > .web-markdown-quote {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.web-book-content.web-smart-content .web-intro-card-grid > .web-smart-callout {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Era summary cards are generated from the actual era/period headings. The
 * original headings and body text remain in their own panels below. */
.web-book-content.web-smart-content .web-era-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 11px 0 14px;
  padding: 10px;
  background: linear-gradient(135deg, #f2fbff, #faf7ff 56%, #fffaf0);
  border: 1px solid #dce8f0;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(38, 76, 108, .07);
}

.web-book-content.web-smart-content .web-era-summary-card {
  --era-accent: #21865b;
  --era-ink: #176b4d;
  --era-soft: #effaf3;
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  min-height: 92px;
  padding: 11px 12px 10px;
  color: var(--era-ink);
  background: linear-gradient(145deg, var(--era-soft), #fff);
  border: 1px solid rgba(33, 134, 91, .25);
  border-top: 4px solid var(--era-accent);
  border-radius: 12px;
  box-shadow: 0 5px 14px rgba(35, 90, 109, .07);
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease;
}

.web-book-content.web-smart-content .web-era-summary-card:hover,
.web-book-content.web-smart-content .web-era-summary-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 9px 18px rgba(35, 90, 109, .13);
  outline: none;
}

.web-book-content.web-smart-content .web-era-summary-card[data-era-tone="2"] {
  --era-accent: #d8791f;
  --era-ink: #8c5314;
  --era-soft: #fff8e8;
  border-color: rgba(216, 121, 31, .26);
}

.web-book-content.web-smart-content .web-era-summary-card[data-era-tone="3"] {
  --era-accent: #2774d0;
  --era-ink: #155c9b;
  --era-soft: #eef7ff;
  border-color: rgba(39, 116, 208, .25);
}

.web-book-content.web-smart-content .web-era-summary-card[data-era-tone="4"] {
  --era-accent: #7654d8;
  --era-ink: #5540a2;
  --era-soft: #f6f2ff;
  border-color: rgba(118, 84, 216, .24);
}

.web-book-content.web-smart-content .web-era-summary-card[data-era-tone="5"] {
  --era-accent: #d75b78;
  --era-ink: #963d58;
  --era-soft: #fff3f6;
  border-color: rgba(215, 91, 120, .24);
}

.web-book-content.web-smart-content .web-era-summary-card strong {
  overflow-wrap: anywhere;
  color: var(--era-ink);
  font-size: 1.02em;
  font-weight: 900;
  line-height: 1.35;
}

.web-book-content.web-smart-content .web-era-summary-range {
  width: fit-content;
  max-width: 100%;
  padding: 2px 8px;
  color: var(--era-ink);
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 999px;
  font-size: .86em;
  font-weight: 800;
  line-height: 1.35;
}

.web-book-content.web-smart-content .web-era-summary-action {
  margin-top: auto;
  color: var(--era-accent);
  font-size: .76em;
  font-weight: 800;
}

.web-book-content.web-smart-content .web-era-section-panel {
  --era-accent: #21865b;
  --era-ink: #176b4d;
  --era-soft: #effaf3;
  min-width: 0;
  margin: 13px 0 15px;
  padding: 11px 12px 12px;
  background: linear-gradient(145deg, var(--era-soft), #fff 72%);
  border: 1px solid rgba(33, 134, 91, .25);
  border-left: 4px solid var(--era-accent);
  border-radius: 14px;
  box-shadow: 0 7px 17px rgba(35, 90, 109, .07);
}

.web-book-content.web-smart-content .web-era-section-panel[data-era-tone="2"] {
  --era-accent: #d8791f;
  --era-ink: #8c5314;
  --era-soft: #fff8e8;
  border-color: rgba(216, 121, 31, .26);
}

.web-book-content.web-smart-content .web-era-section-panel[data-era-tone="3"] {
  --era-accent: #2774d0;
  --era-ink: #155c9b;
  --era-soft: #eef7ff;
  border-color: rgba(39, 116, 208, .25);
}

.web-book-content.web-smart-content .web-era-section-panel[data-era-tone="4"] {
  --era-accent: #7654d8;
  --era-ink: #5540a2;
  --era-soft: #f6f2ff;
  border-color: rgba(118, 84, 216, .24);
}

.web-book-content.web-smart-content .web-era-section-panel[data-era-tone="5"] {
  --era-accent: #d75b78;
  --era-ink: #963d58;
  --era-soft: #fff3f6;
  border-color: rgba(215, 91, 120, .24);
}

.web-book-content.web-smart-content .web-era-section-panel > .web-content-heading {
  margin: 0 0 7px !important;
  padding: 5px 8px 6px !important;
  color: var(--era-ink) !important;
  background: rgba(255, 255, 255, .58) !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .9) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  line-height: 1.3 !important;
}

.web-book-content.web-smart-content .web-era-section-panel > .web-smart-plain-line,
.web-book-content.web-smart-content .web-era-section-panel > p,
.web-book-content.web-smart-content .web-era-section-panel > div {
  margin-top: 0 !important;
  margin-bottom: 5px !important;
  line-height: 1.56;
}

.web-book-content.web-smart-content .web-era-section-panel > .web-smart-plain-line:last-child,
.web-book-content.web-smart-content .web-era-section-panel > p:last-child,
.web-book-content.web-smart-content .web-era-section-panel > div:last-child {
  margin-bottom: 0 !important;
}

/* Content length-aware MCQ layout: two columns by default, three for short
 * cards on wide layouts, and four only for a genuinely dense four-card run. */
.web-book-content.web-smart-content .web-mcq-grid--count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 980px) {
  .web-book-content.web-smart-content .web-mcq-grid.web-mcq-grid--dense.web-mcq-grid--count-3,
  .web-book-content.web-smart-content .web-mcq-grid.web-mcq-grid--dense.web-mcq-grid--count-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .web-book-content.web-smart-content .web-mcq-grid.web-mcq-grid--dense.web-mcq-grid--count-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Premium table finish. The table stays a real table; only its presentation
 * changes, and the wrapper scrolls horizontally only when necessary. */
.web-book-content.web-smart-content .web-smart-table-wrap {
  margin: 9px 0 12px;
  border-color: #c9dceb;
  border-radius: 12px;
}

.web-book-content.web-smart-content .web-smart-table-wrap > table {
  table-layout: auto;
}

.web-book-content.web-smart-content .web-smart-table-wrap th,
.web-book-content.web-smart-content .web-smart-table-wrap td {
  padding: 7px 9px;
  line-height: 1.45;
}

.web-book-content.web-smart-content .web-smart-table-wrap thead th,
.web-book-content.web-smart-content .web-smart-table-wrap .web-table-header-row th {
  color: #fff;
  background: linear-gradient(135deg, #176ca6, #604bc6);
  border-color: #4f79b7;
}

.web-book-content.web-smart-content .web-smart-table-wrap tbody tr:nth-child(odd) td {
  background: #fbfdff;
}

.web-book-content.web-smart-content .web-smart-table-wrap tbody tr:nth-child(even) td {
  background: #eef7ff;
}

.web-book-content.web-smart-content .web-smart-table-wrap tbody tr:hover td {
  background: #fff7e8;
}

.web-prev-next {
  gap: 10px;
  margin-top: 20px;
  padding-top: 15px;
}

.web-review-section {
  margin-top: 21px;
  padding-top: 19px;
}

@media (max-width: 900px) {
  .web-reader-sidebar {
    max-height: none;
  }

  .web-reader-lecture-list {
    max-height: 330px;
  }
}

@media (max-width: 760px) {
  .web-book-header,
  .web-book-header.web-book-header--with-visual {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .web-book-header--with-visual .web-book-header-copy {
    grid-column: 1;
    grid-row: 1;
  }

  .web-book-header--with-visual .web-book-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .web-book-header--with-visual .web-book-visual {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    width: min(230px, 100%);
    margin-top: 4px;
  }

  .web-book-content.web-smart-content .web-intro-card-grid,
  .web-book-content.web-smart-content .web-era-summary-grid {
    grid-template-columns: 1fr;
  }

  .web-book-content.web-smart-content .web-era-summary-card {
    min-height: 0;
  }

  .web-book-content.web-smart-content .web-mcq-grid,
  .web-book-content.web-smart-content .web-mcq-grid.web-mcq-grid--dense.web-mcq-grid--count-3,
  .web-book-content.web-smart-content .web-mcq-grid.web-mcq-grid--dense.web-mcq-grid--count-4 {
    grid-template-columns: 1fr;
  }
}

@media print {
  .web-book-content.web-smart-content .web-era-summary-grid {
    box-shadow: none;
  }

  .web-book-content.web-smart-content .web-era-section-panel,
  .web-book-content.web-smart-content .web-intro-card-grid,
  .web-book-content.web-smart-content .web-era-summary-card {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* Reference-aligned reader navigation ------------------------------------
 * The desktop reader has two separate stacked cards in the left column:
 * the complete lecture list first, followed by the current lecture's
 * content-based Chapter Navigation. The same stack becomes one mobile drawer.
 */
.web-reader-sidebar-stack {
  display: grid;
  align-self: start;
  gap: 14px;
  min-width: 0;
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  scrollbar-color: #b8d1e4 transparent;
  scrollbar-width: thin;
}

.web-reader-sidebar-stack::-webkit-scrollbar {
  width: 6px;
}

.web-reader-sidebar-stack::-webkit-scrollbar-thumb {
  background: #b8d1e4;
  border-radius: 999px;
}

.web-reader-sidebar-stack > .web-lecture-sidebar {
  position: static;
  top: auto;
  max-height: none;
  overflow: hidden;
}

.web-reader-sidebar-stack > .web-reader-sidebar {
  padding-bottom: 14px;
}

.web-reader-sidebar-stack > .web-chapter-sidebar {
  padding-bottom: 0;
}

.web-chapter-sidebar .web-content-chapter-navigation {
  margin: 0;
  padding: 0 14px 14px;
  border-top: 0;
}

.web-chapter-sidebar .web-content-chapter-navigation__header {
  margin-top: 0;
  padding-top: 16px;
}

@media (max-width: 900px) {
  .web-reader-sidebar-stack {
    position: fixed;
    z-index: 4;
    top: 0;
    bottom: 0;
    left: 0;
    display: grid;
    align-content: start;
    width: min(88vw, 340px);
    max-height: none;
    padding: 12px;
    overflow-y: auto;
    background: linear-gradient(160deg, #f4fbff, #f8f4ff);
    border-radius: 0 16px 16px 0;
    box-shadow: 12px 0 35px rgba(11, 37, 63, .2);
    transform: translateX(-105%);
    transition: transform .22s ease;
  }

  .web-reader-sidebar-stack.is-open {
    transform: translateX(0);
  }

  .web-reader-sidebar-stack > .web-lecture-sidebar,
  .web-reader-sidebar-stack > .web-reader-sidebar {
    position: static;
    width: auto;
    max-height: none;
    overflow: hidden;
    border-radius: 14px;
    transform: none;
  }
}

/* The left stack is the only chapter navigation in the reference reader.
 * Hide the legacy top-of-book TOC even if an older cached script or template
 * has already emitted one, so it can never create a horizontal row or blank
 * space above the content. */
.web-book-page .web-smart-toc {
  display: none !important;
  margin: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

@media print {
  .web-reader-sidebar-stack {
    display: none !important;
  }
}


/* =========================================================
   Lecture Zone - Premium Colorful Left Sidebar
   Public UI only. No data/API/admin/app logic changes.
   ========================================================= */
.web-lecture-sidebar {
  border: 1px solid rgba(116, 143, 185, .20);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 16px 42px rgba(39, 83, 128, .11);
}

.web-sidebar-header {
  padding: 18px 16px;
  color: #17395f;
  background:
    radial-gradient(circle at 10% 20%, rgba(0, 184, 255, .12), transparent 34%),
    radial-gradient(circle at 90% 0%, rgba(124, 77, 255, .13), transparent 34%),
    linear-gradient(135deg, #f3fbff 0%, #f8f5ff 100%);
}

.web-sidebar-header div > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, #19b7e8, #7658ef);
  box-shadow: 0 8px 18px rgba(90, 87, 222, .22);
  font-size: 17px;
}

.web-sidebar-header strong {
  font-size: 15px;
  letter-spacing: .1px;
}

.web-sidebar-all {
  position: relative;
  margin: 12px;
  padding: 11px 12px;
  overflow: hidden;
  border: 1px solid #e8eef8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(42, 79, 120, .045);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.web-sidebar-all:hover,
.web-sidebar-all.selected {
  transform: translateY(-1px);
  border-color: #cbdfff;
  background: linear-gradient(135deg, #edf7ff, #f4f1ff);
  box-shadow: 0 8px 20px rgba(45, 110, 211, .10);
}

.web-sidebar-all > span {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #1ba9e7, #5e6af0);
  box-shadow: 0 6px 14px rgba(59, 103, 230, .22);
}

.web-sidebar-group {
  position: relative;
  margin: 8px 10px 10px;
  overflow: hidden;
  border: 1px solid rgba(72, 126, 178, .11);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(36, 75, 112, .055);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.web-sidebar-group:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(35, 79, 128, .09);
}

.web-sidebar-group::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(180deg, #1db4ed, #6658ed);
}

.web-sidebar-group:nth-of-type(3n+2)::before { background: linear-gradient(180deg, #16b8de, #4a76f3); }
.web-sidebar-group:nth-of-type(3n)::before   { background: linear-gradient(180deg, #8b5cf6, #ec4899); }
.web-sidebar-group:nth-of-type(3n+1)::before { background: linear-gradient(180deg, #06b6d4, #14b87a); }

.web-sidebar-subject {
  min-height: 62px;
  padding: 12px 12px 10px 15px;
  background: linear-gradient(135deg, rgba(247,252,255,.96), rgba(252,250,255,.96));
  transition: background .18s ease;
}

.web-sidebar-subject:hover {
  background: linear-gradient(135deg, #f0f9ff, #f8f4ff);
}

.web-subject-icon {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, #19b7e8, #6559ec);
  box-shadow: 0 7px 16px rgba(66, 99, 221, .22);
  font-size: 17px;
}

.web-sidebar-group:nth-of-type(3n) .web-subject-icon {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
}
.web-sidebar-group:nth-of-type(3n+1) .web-subject-icon {
  background: linear-gradient(135deg, #06b6d4, #18b981);
}

.web-sidebar-subject strong {
  color: #173b63;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.3;
}

.web-sidebar-subject small {
  width: fit-content;
  margin-top: 3px;
  padding: 2px 7px;
  color: #61738b;
  border: 1px solid #e4ebf4;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  font-size: 10px;
  font-weight: 700;
}

.web-sidebar-subject > b {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  color: #54749a;
  background: #eef5fb;
  font-size: 14px;
}

.web-sidebar-topics {
  gap: 4px;
  padding: 3px 10px 12px 15px;
}

.web-sidebar-topics a {
  position: relative;
  min-height: 34px;
  padding: 7px 8px 7px 12px;
  border: 1px solid transparent;
  border-left: 0;
  border-radius: 9px;
  color: #63758b;
  background: transparent;
  transition: color .16s ease, background .16s ease, transform .16s ease, border-color .16s ease;
}

.web-sidebar-topics a::before {
  content: "";
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  margin-right: 2px;
  border-radius: 50%;
  background: #c6d5e6;
  box-shadow: 0 0 0 3px rgba(190, 210, 232, .18);
}

.web-sidebar-topics a > span {
  flex: 1 1 auto;
}

.web-sidebar-topics a small {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid #e6edf5;
  border-radius: 999px;
  color: #778aa2;
  background: #fff;
  font-size: 10px;
  font-weight: 800;
}

.web-sidebar-topics a:hover {
  transform: translateX(2px);
  color: #145eb5;
  border-color: #dcecff;
  background: linear-gradient(90deg, #f1f8ff, #fbfdff);
}

.web-sidebar-topics a:hover::before {
  background: #2c8ff0;
  box-shadow: 0 0 0 3px rgba(44, 143, 240, .13);
}

.web-sidebar-topics a.selected {
  color: #0c61bd;
  border-color: #cfe4ff;
  background: linear-gradient(90deg, #eaf5ff 0%, #f5f2ff 100%);
  box-shadow: 0 5px 13px rgba(37, 117, 207, .08);
  font-weight: 700;
}

.web-sidebar-topics a.selected::before {
  background: linear-gradient(135deg, #1c9ef0, #7057ee);
  box-shadow: 0 0 0 3px rgba(78, 111, 232, .14);
}

.web-sidebar-topics a.selected small {
  color: #1767bd;
  border-color: #c9e1ff;
  background: #fff;
}

.web-sidebar-group.is-selected {
  border-color: rgba(65, 126, 232, .28);
  box-shadow: 0 10px 26px rgba(55, 102, 202, .11);
}

.web-sidebar-group.is-selected > .web-sidebar-subject {
  background: linear-gradient(135deg, #ebf7ff 0%, #f5f0ff 100%);
}

.web-sidebar-group.is-selected > .web-sidebar-subject strong {
  color: #155fae;
}

@media (max-width: 820px) {
  .web-sidebar-group { margin-left: 8px; margin-right: 8px; }
  .web-sidebar-subject { min-height: 58px; }
}

/* =========================================================
   Lecture Zone - Multi-color Category Titles
   Each category automatically receives its own visual tone.
   CSS-only; no PHP/data/API changes.
   ========================================================= */
.web-sidebar-group:nth-of-type(6n+1) > .web-sidebar-subject strong { color: #0b73c9; }
.web-sidebar-group:nth-of-type(6n+2) > .web-sidebar-subject strong { color: #7c3aed; }
.web-sidebar-group:nth-of-type(6n+3) > .web-sidebar-subject strong { color: #059669; }
.web-sidebar-group:nth-of-type(6n+4) > .web-sidebar-subject strong { color: #ea580c; }
.web-sidebar-group:nth-of-type(6n+5) > .web-sidebar-subject strong { color: #db2777; }
.web-sidebar-group:nth-of-type(6n)   > .web-sidebar-subject strong { color: #4f46e5; }

.web-sidebar-group:nth-of-type(6n+1)::before { background: linear-gradient(180deg,#22b8f0,#2563eb); }
.web-sidebar-group:nth-of-type(6n+2)::before { background: linear-gradient(180deg,#8b5cf6,#d946ef); }
.web-sidebar-group:nth-of-type(6n+3)::before { background: linear-gradient(180deg,#14b8a6,#16a34a); }
.web-sidebar-group:nth-of-type(6n+4)::before { background: linear-gradient(180deg,#f59e0b,#f97316); }
.web-sidebar-group:nth-of-type(6n+5)::before { background: linear-gradient(180deg,#f43f5e,#ec4899); }
.web-sidebar-group:nth-of-type(6n)::before   { background: linear-gradient(180deg,#6366f1,#3b82f6); }

.web-sidebar-group:nth-of-type(6n+1) .web-subject-icon { background: linear-gradient(135deg,#22b8f0,#2563eb); box-shadow:0 7px 16px rgba(37,99,235,.22); }
.web-sidebar-group:nth-of-type(6n+2) .web-subject-icon { background: linear-gradient(135deg,#8b5cf6,#d946ef); box-shadow:0 7px 16px rgba(168,85,247,.22); }
.web-sidebar-group:nth-of-type(6n+3) .web-subject-icon { background: linear-gradient(135deg,#14b8a6,#16a34a); box-shadow:0 7px 16px rgba(20,184,166,.22); }
.web-sidebar-group:nth-of-type(6n+4) .web-subject-icon { background: linear-gradient(135deg,#fbbf24,#f97316); box-shadow:0 7px 16px rgba(249,115,22,.22); }
.web-sidebar-group:nth-of-type(6n+5) .web-subject-icon { background: linear-gradient(135deg,#fb7185,#ec4899); box-shadow:0 7px 16px rgba(236,72,153,.22); }
.web-sidebar-group:nth-of-type(6n)   .web-subject-icon { background: linear-gradient(135deg,#6366f1,#3b82f6); box-shadow:0 7px 16px rgba(79,70,229,.22); }

.web-sidebar-group:nth-of-type(6n+1) > .web-sidebar-subject small { color:#0b73c9; background:#eff8ff; border-color:#d6ebff; }
.web-sidebar-group:nth-of-type(6n+2) > .web-sidebar-subject small { color:#7c3aed; background:#f7f2ff; border-color:#eadcff; }
.web-sidebar-group:nth-of-type(6n+3) > .web-sidebar-subject small { color:#047857; background:#effcf8; border-color:#d3f4e8; }
.web-sidebar-group:nth-of-type(6n+4) > .web-sidebar-subject small { color:#c2410c; background:#fff8ed; border-color:#ffead0; }
.web-sidebar-group:nth-of-type(6n+5) > .web-sidebar-subject small { color:#be185d; background:#fff1f7; border-color:#ffd9e9; }
.web-sidebar-group:nth-of-type(6n)   > .web-sidebar-subject small { color:#4338ca; background:#f2f3ff; border-color:#dfe1ff; }

/* Preserve the category's own color even when that category is selected. */
.web-sidebar-group:nth-of-type(6n+1).is-selected > .web-sidebar-subject strong { color:#075fae; }
.web-sidebar-group:nth-of-type(6n+2).is-selected > .web-sidebar-subject strong { color:#6d28d9; }
.web-sidebar-group:nth-of-type(6n+3).is-selected > .web-sidebar-subject strong { color:#047857; }
.web-sidebar-group:nth-of-type(6n+4).is-selected > .web-sidebar-subject strong { color:#c2410c; }
.web-sidebar-group:nth-of-type(6n+5).is-selected > .web-sidebar-subject strong { color:#be185d; }
.web-sidebar-group:nth-of-type(6n).is-selected   > .web-sidebar-subject strong { color:#4338ca; }


/* =========================================================
   LECTURE ZONE — MULTICOLOR CONTENT/Lecture CARDS
   UI only. No data/API/PHP behavior is changed.
   ========================================================= */
.web-lecture-list-card {
  position: relative;
  overflow: hidden;
  border-width: 1px;
  border-left-width: 4px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.web-lecture-list-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--lecture-accent, #2563eb);
}

.web-lecture-list-card:nth-child(6n+1) {
  --lecture-accent:#2563eb;
  --lecture-accent-2:#06b6d4;
  --lecture-soft:#f0f8ff;
  --lecture-soft-2:#f5fbff;
  --lecture-border:#c9e3fb;
}
.web-lecture-list-card:nth-child(6n+2) {
  --lecture-accent:#7c3aed;
  --lecture-accent-2:#c026d3;
  --lecture-soft:#f7f2ff;
  --lecture-soft-2:#fff4fd;
  --lecture-border:#e1cdfb;
}
.web-lecture-list-card:nth-child(6n+3) {
  --lecture-accent:#059669;
  --lecture-accent-2:#14b8a6;
  --lecture-soft:#effcf7;
  --lecture-soft-2:#f1fffb;
  --lecture-border:#c7eadc;
}
.web-lecture-list-card:nth-child(6n+4) {
  --lecture-accent:#ea580c;
  --lecture-accent-2:#f59e0b;
  --lecture-soft:#fff7ed;
  --lecture-soft-2:#fffbeb;
  --lecture-border:#fed7aa;
}
.web-lecture-list-card:nth-child(6n+5) {
  --lecture-accent:#db2777;
  --lecture-accent-2:#f43f5e;
  --lecture-soft:#fff1f7;
  --lecture-soft-2:#fff5f6;
  --lecture-border:#f7c7db;
}
.web-lecture-list-card:nth-child(6n+6) {
  --lecture-accent:#0891b2;
  --lecture-accent-2:#0ea5e9;
  --lecture-soft:#eefcff;
  --lecture-soft-2:#f0f9ff;
  --lecture-border:#bae6f2;
}

.web-lecture-list-card {
  background: linear-gradient(120deg, var(--lecture-soft, #f8fbff) 0%, #fff 56%, var(--lecture-soft-2, #f8fbff) 100%);
  border-color: var(--lecture-border, #dbeafe);
  border-left-color: var(--lecture-accent, #2563eb);
}

.web-lecture-list-card:hover {
  border-color: var(--lecture-accent, #2563eb);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--lecture-accent, #2563eb) 18%, transparent);
  transform: translateY(-2px);
}

.web-lecture-list-card .web-list-lecture-icon {
  color: var(--lecture-accent, #2563eb);
  background: linear-gradient(135deg, var(--lecture-soft, #eef6ff), #fff);
  border-color: var(--lecture-border, #dbeafe);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--lecture-accent, #2563eb) 12%, transparent);
}

.web-lecture-list-card .web-list-lecture-info h3 {
  color: var(--lecture-accent, #1e3a8a);
  font-weight: 800;
}

.web-lecture-list-card .web-list-meta {
  color: #75869c;
}

.web-lecture-list-card .web-free {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--lecture-accent, #16a34a), var(--lecture-accent-2, #22c55e));
  font-size: 10px;
  line-height: 1.5;
  box-shadow: 0 3px 8px color-mix(in srgb, var(--lecture-accent, #16a34a) 18%, transparent);
}

.web-lecture-list-card .web-premium {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  font-size: 10px;
}

.web-lecture-list-card .web-view-lecture-button {
  color: #fff;
  background: linear-gradient(135deg, var(--lecture-accent, #2563eb), var(--lecture-accent-2, #06b6d4));
  border-color: transparent;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--lecture-accent, #2563eb) 20%, transparent);
}

.web-lecture-list-card .web-view-lecture-button:hover {
  color: #fff;
  filter: saturate(1.08) brightness(.96);
  border-color: transparent;
}

@supports not (color: color-mix(in srgb, red, blue)) {
  .web-lecture-list-card:hover,
  .web-lecture-list-card .web-list-lecture-icon,
  .web-lecture-list-card .web-free,
  .web-lecture-list-card .web-view-lecture-button {
    box-shadow: 0 10px 24px rgba(30, 64, 175, .12);
  }
}

@media (max-width: 720px) {
  .web-lecture-list-card {
    border-left-width: 3px;
  }
  .web-lecture-list-card::before {
    width: 3px;
  }
}

/* ==========================================================
   Lecture Zone Premium Light Dashboard UI — website only
   Scope: /website-lectures/ browse page. Reader/detail logic untouched.
   ========================================================== */
.web-premium-library-hero{
  position:relative; overflow:hidden; padding:34px 0 28px!important;
  background:
    radial-gradient(circle at 49% 30%,rgba(108,92,231,.12),transparent 26%),
    radial-gradient(circle at 86% 45%,rgba(36,153,255,.14),transparent 30%),
    linear-gradient(115deg,#f7fcff 0%,#eef8ff 37%,#f7f2ff 68%,#eef8ff 100%);
  border-bottom:1px solid #dbeafe;
}
.web-premium-library-hero:before{content:"";position:absolute;inset:0;opacity:.32;pointer-events:none;background-image:radial-gradient(#60a5fa 1px,transparent 1px);background-size:18px 18px;mask-image:linear-gradient(90deg,#000,transparent 35%,transparent 78%,#000)}
.web-premium-hero-shell{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1.55fr) minmax(260px,.8fr);align-items:center;gap:34px}
.web-premium-hero-copy h1{font-size:clamp(42px,5vw,64px)!important;letter-spacing:-.035em;margin:10px 0 6px!important;color:#102a56!important}
.web-premium-hero-copy>p{font-size:18px!important;color:#5b6c86!important;max-width:620px}
.web-library-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:26px;max-width:850px}
.web-library-stat{display:flex;align-items:center;gap:12px;min-height:84px;padding:14px 16px;background:rgba(255,255,255,.84);border:1px solid rgba(203,213,225,.8);border-radius:15px;box-shadow:0 12px 30px rgba(30,64,175,.07),inset 0 1px 0 #fff;backdrop-filter:blur(14px)}
.web-stat-icon{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border-radius:12px;color:#fff;font-size:19px;font-weight:900;box-shadow:0 8px 20px rgba(37,99,235,.22)}
.stat-blue .web-stat-icon{background:linear-gradient(135deg,#2563eb,#0ea5e9)} .stat-green .web-stat-icon{background:linear-gradient(135deg,#16a34a,#22c55e)} .stat-purple .web-stat-icon{background:linear-gradient(135deg,#7c3aed,#a855f7)} .stat-orange .web-stat-icon{background:linear-gradient(135deg,#f59e0b,#f97316)}
.web-library-stat small,.web-library-stat em{display:block;font-style:normal;color:#65758b;font:600 10px/1.25 Inter,"Hind Siliguri",sans-serif}.web-library-stat strong{display:block;margin:2px 0;color:#102a56;font:900 24px/1 Inter,"Hind Siliguri",sans-serif}
.web-premium-hero-art{position:relative;min-height:270px;display:grid;place-items:center}
.web-premium-hero-art:before{content:"";position:absolute;width:280px;height:280px;border:1px solid rgba(96,165,250,.28);border-radius:50%;box-shadow:0 0 80px rgba(99,102,241,.18)}
.web-art-orbit{position:absolute;border:1px solid rgba(99,102,241,.17);border-radius:50%}.orbit-a{width:220px;height:220px}.orbit-b{width:310px;height:180px;transform:rotate(-11deg)}
.web-book-stack{position:relative;width:230px;height:170px;filter:drop-shadow(0 22px 24px rgba(49,46,129,.17))}.web-cap{position:absolute;z-index:4;top:-13px;left:61px;font-size:84px;filter:drop-shadow(0 8px 8px rgba(30,64,175,.2))}.book{position:absolute;left:28px;width:180px;height:48px;border-radius:14px 8px 8px 14px;border:2px solid rgba(255,255,255,.75);transform:skewX(-4deg)}.book-one{top:74px;background:linear-gradient(135deg,#2563eb,#60a5fa)}.book-two{top:109px;left:16px;background:linear-gradient(135deg,#7c3aed,#a78bfa)}.book-three{top:142px;left:40px;background:linear-gradient(135deg,#8b5cf6,#c084fc)}
.web-art-float{position:absolute;z-index:5;display:grid;place-items:center;width:46px;height:46px;border:1px solid rgba(255,255,255,.85);border-radius:13px;background:rgba(255,255,255,.86);color:#2563eb;font-size:24px;font-weight:900;box-shadow:0 12px 30px rgba(37,99,235,.14);backdrop-filter:blur(9px)}.art-play{left:7%;top:15%}.art-book{right:7%;top:25%}.art-note{left:18%;bottom:12%}
.web-premium-library-page{padding-top:30px;background:linear-gradient(180deg,#f7faff 0%,#f8fbff 55%,#f4f7ff 100%)}
.web-premium-browse-layout{grid-template-columns:minmax(245px,292px) minmax(0,1fr);gap:18px}
.web-premium-library-sidebar{border-radius:17px;border-color:#dbe7f5;box-shadow:0 14px 35px rgba(30,64,175,.07)}
.web-premium-library-sidebar .web-sidebar-header{padding:16px;background:#fff;border-bottom:1px solid #e8eef8}
.web-premium-library-sidebar .web-sidebar-all{margin:10px;border:1px solid #dbe7f5;border-radius:13px;padding:12px 11px;gap:10px;background:#fff;box-shadow:0 6px 16px rgba(37,99,235,.04)}
.web-premium-library-sidebar .web-sidebar-all>span:nth-child(2){display:flex;flex-direction:column;min-width:0}.web-premium-library-sidebar .web-sidebar-all small{font-size:10px;color:#8b9bb0;margin-top:2px}.web-sidebar-all-icon{display:grid!important;place-items:center;width:40px;height:40px;border-radius:11px;background:linear-gradient(135deg,#2563eb,#0ea5e9);color:#fff;font-size:18px;box-shadow:0 8px 18px rgba(37,99,235,.2)}.web-premium-library-sidebar .web-sidebar-all>b{margin-left:auto;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#eff6ff;color:#2563eb;font-size:11px}
.web-premium-library-sidebar .web-sidebar-group{position:relative;margin:8px 10px;border:1px solid #e5ecf7;border-radius:14px;overflow:hidden;background:#fff}.web-premium-library-sidebar .web-sidebar-group:before{content:"";position:absolute;inset:0 auto 0 0;width:3px;background:var(--group-color,#7c3aed)}
.web-premium-library-sidebar .palette-1{--group-color:#7c3aed;--group-soft:#f6f1ff}.web-premium-library-sidebar .palette-2{--group-color:#10b981;--group-soft:#effcf7}.web-premium-library-sidebar .palette-3{--group-color:#0ea5e9;--group-soft:#eefaff}.web-premium-library-sidebar .palette-4{--group-color:#f59e0b;--group-soft:#fff9e9}.web-premium-library-sidebar .palette-5{--group-color:#ec4899;--group-soft:#fff1f7}.web-premium-library-sidebar .palette-6{--group-color:#6366f1;--group-soft:#f1f2ff}
.web-premium-library-sidebar .web-sidebar-group.is-selected>.web-sidebar-subject{background:linear-gradient(90deg,var(--group-soft),#fff);color:var(--group-color)}.web-premium-library-sidebar .web-sidebar-group.is-selected>.web-sidebar-subject strong{color:var(--group-color)}.web-premium-library-sidebar .web-subject-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:var(--group-soft);color:var(--group-color)}.web-premium-library-sidebar .web-sidebar-topics a.selected{color:var(--group-color);background:var(--group-soft);border-left-color:var(--group-color)}
.web-premium-list-panel{padding:18px 18px 20px;background:rgba(255,255,255,.6);border:1px solid #dbe7f5;border-radius:18px;box-shadow:0 14px 34px rgba(30,64,175,.045)}
.web-premium-panel-top{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:14px}.web-premium-panel-top .web-list-heading{margin:0;align-items:center}.web-premium-panel-top .web-list-heading h2{font-size:28px}.web-lecture-filter-tabs{display:grid;grid-template-columns:repeat(4,auto);align-items:center;overflow:hidden;background:#fff;border:1px solid #dbe6f4;border-radius:13px;box-shadow:0 7px 20px rgba(30,64,175,.06)}.web-lecture-filter-tabs button{border:0;background:transparent;padding:11px 14px;color:#50627b;font:700 12px/1 Inter,"Hind Siliguri",sans-serif;cursor:pointer;transition:.2s}.web-lecture-filter-tabs button:hover{background:#f8fbff}.web-lecture-filter-tabs button.active{color:#fff;background:linear-gradient(135deg,#2563eb,#0ea5e9);box-shadow:0 5px 16px rgba(37,99,235,.24)}
.web-premium-lecture-list{gap:13px}.web-premium-lecture-card{position:relative;min-height:155px;padding:16px 17px 16px 18px;border-radius:16px;border:1px solid #dce6f6;box-shadow:0 9px 24px rgba(30,64,175,.055);overflow:hidden}.web-premium-lecture-card:hover{transform:translateY(-2px);border-color:#b8c8ff;box-shadow:0 16px 32px rgba(79,70,229,.10)}.web-new-ribbon{position:absolute;left:-28px;top:13px;z-index:3;width:94px;padding:4px 0;text-align:center;transform:rotate(-45deg);background:linear-gradient(135deg,#2563eb,#7c3aed);color:#fff;font:800 9px/1 Inter,sans-serif;letter-spacing:.06em}.web-premium-thumb{flex:0 0 118px;width:118px;height:118px;border-radius:14px;padding:5px;background:linear-gradient(135deg,#eef6ff,#f6f1ff);box-shadow:0 9px 20px rgba(30,64,175,.11)}.web-premium-thumb img{width:100%;height:100%;object-fit:cover;border-radius:10px}.web-premium-lecture-info{align-self:center}.web-premium-meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.web-premium-meta>span:first-child{color:#64748b}.web-reading-pill{padding:5px 8px!important;border-radius:999px!important;background:#eef5ff!important;color:#2563eb!important;font-weight:800!important}.web-premium-lecture-info h3{margin:8px 0 5px!important;color:#1559c3!important;font-size:19px!important;line-height:1.35}.web-premium-path{color:#75859a!important;font-size:12px!important}.web-premium-card-chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.web-premium-card-chips span{padding:6px 9px;border:1px solid #e4eaf4;border-radius:8px;background:#f8fbff;color:#51657f;font:700 10px/1 Inter,"Hind Siliguri",sans-serif}.web-premium-view-button{min-width:145px;justify-content:center;padding:13px 17px!important;border-radius:11px!important;background:linear-gradient(135deg,#6d28d9,#2563eb 58%,#06b6d4)!important;color:#fff!important;border:0!important;box-shadow:0 10px 22px rgba(79,70,229,.22)!important}.web-premium-view-button:hover{filter:saturate(1.08) brightness(1.03);transform:translateY(-1px)!important}
.web-premium-cta-strip{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;margin:17px 0;padding:16px 17px;border:1px solid #d7cfff;border-radius:15px;background:linear-gradient(100deg,#f9f5ff,#f3f8ff);box-shadow:inset 0 1px 0 #fff}.web-premium-cta-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:linear-gradient(135deg,#8b5cf6,#6366f1);color:#fff;font-size:20px;box-shadow:0 8px 18px rgba(124,58,237,.19)}.web-premium-cta-strip strong{display:block;color:#2257bf;font-size:16px}.web-premium-cta-strip span{display:block;margin-top:2px;color:#6b7c93;font-size:11px}.web-premium-cta-strip a{padding:10px 14px;border:1px solid #d9dfff;border-radius:10px;background:#fff;color:#2563eb;text-decoration:none;font-weight:800;font-size:12px}
.web-premium-lower-grid{display:grid;grid-template-columns:1fr 1fr .9fr;gap:12px;margin-top:12px}.web-mini-feature-card{min-width:0;padding:14px;border:1px solid #e0e8f3;border-radius:15px;background:linear-gradient(145deg,#fff,#fbf9ff);box-shadow:0 8px 22px rgba(30,64,175,.045)}.web-recent-card{background:linear-gradient(145deg,#fff,#f5fff9)}.web-why-card{background:linear-gradient(145deg,#fff,#f4f8ff)}.web-mini-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:11px;color:#283b59;font-size:13px}.web-mini-lecture{display:grid;grid-template-columns:74px 1fr;gap:10px;color:inherit;text-decoration:none}.web-mini-thumb{width:74px;height:74px;border-radius:10px;overflow:hidden;background:#eef5ff;display:grid;place-items:center;font-size:28px}.web-mini-thumb img{width:100%;height:100%;object-fit:cover}.web-mini-badge{display:inline-block;padding:3px 6px;background:#dcfce7;color:#15803d;border-radius:999px;font-size:9px;font-weight:800}.web-mini-lecture h4{margin:5px 0 4px;color:#1d5ac7;font-size:12px;line-height:1.35}.web-mini-lecture small{color:#8795a8;font-size:10px}.web-mini-recent-link{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;padding:8px 0;border-bottom:1px dashed #dfe7ef;color:inherit;text-decoration:none}.web-mini-recent-link:last-child{border-bottom:0}.web-mini-recent-link>span{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#ecfdf5}.web-mini-recent-link strong{display:block;color:#1d5ac7;font-size:11px;line-height:1.3}.web-mini-recent-link small{display:block;color:#8a98aa;font-size:9px;margin-top:2px}.web-mini-recent-link>b{color:#2563eb}.web-why-card ul{list-style:none;margin:0;padding:0;display:grid;gap:8px}.web-why-card li{position:relative;padding-left:20px;color:#52647a;font-size:11px}.web-why-card li:before{content:"✓";position:absolute;left:0;top:0;display:grid;place-items:center;width:14px;height:14px;border-radius:50%;background:#dcfce7;color:#16a34a;font-size:9px;font-weight:900}
.web-premium-library-page .web-pagination{margin-top:22px}
@media (max-width:1100px){.web-library-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.web-premium-hero-shell{grid-template-columns:1fr 300px}.web-premium-lower-grid{grid-template-columns:1fr 1fr}.web-why-card{grid-column:1/-1}.web-lecture-filter-tabs button{padding:10px 11px}.web-lecture-filter-tabs button span{display:none}}
@media (max-width:820px){.web-premium-library-hero{padding:26px 0 22px!important}.web-premium-hero-shell{grid-template-columns:1fr}.web-premium-hero-art{display:none}.web-library-stats{margin-top:20px}.web-premium-library-page{padding-top:18px}.web-premium-list-panel{padding:14px}.web-premium-panel-top{align-items:stretch;flex-direction:column}.web-lecture-filter-tabs{width:max-content;max-width:100%}.web-lecture-filter-tabs button span{display:inline}.web-premium-lecture-card{display:grid!important;grid-template-columns:90px 1fr;align-items:start;min-height:0}.web-premium-thumb{width:90px;height:90px;flex-basis:90px}.web-premium-view-button{grid-column:1/-1;width:100%;min-width:0}.web-premium-lower-grid{grid-template-columns:1fr}.web-why-card{grid-column:auto}.web-premium-cta-strip{grid-template-columns:auto 1fr}.web-premium-cta-strip a{grid-column:1/-1;text-align:center}}
@media (max-width:560px){.web-premium-hero-copy h1{font-size:38px!important}.web-premium-hero-copy>p{font-size:15px!important}.web-library-stats{gap:9px}.web-library-stat{min-height:70px;padding:10px;gap:8px}.web-stat-icon{width:36px;height:36px;flex-basis:36px}.web-library-stat strong{font-size:20px}.web-library-stat small,.web-library-stat em{font-size:8.5px}.web-premium-list-panel{padding:11px;border-radius:14px}.web-premium-panel-top .web-list-heading h2{font-size:23px}.web-lecture-filter-tabs{display:flex;overflow-x:auto;width:100%;scrollbar-width:none}.web-lecture-filter-tabs::-webkit-scrollbar{display:none}.web-lecture-filter-tabs button{flex:0 0 auto}.web-premium-lecture-card{grid-template-columns:72px 1fr;padding:13px 12px}.web-premium-thumb{width:72px;height:72px;flex-basis:72px}.web-premium-lecture-info h3{font-size:15px!important}.web-premium-meta>span:first-child{display:none}.web-reading-pill{font-size:8.5px!important}.web-premium-card-chips{gap:5px}.web-premium-card-chips span{font-size:8.5px;padding:5px 7px}.web-premium-cta-strip{padding:13px}.web-premium-cta-icon{width:38px;height:38px}.web-premium-cta-strip strong{font-size:14px}.web-premium-library-sidebar .web-sidebar-group{margin:7px 9px}}

/* ========================================================================
   SAFE MCQ-ONLY QUIZ/EXAM CARD UPGRADE
   Scope: Website Lecture content MCQ components only.
   IMPORTANT: No hero/sidebar/listing/navigation/global selectors below.
   ======================================================================== */
.web-book-content.web-smart-content {
  counter-reset: lecture-mcq;
}

.web-book-content.web-smart-content .web-mcq-card {
  counter-increment: lecture-mcq;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
  grid-template-rows: auto auto 1fr;
  column-gap: 14px;
  row-gap: 0;
  position: relative;
  padding: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dce6f2;
  border-left: 4px solid var(--mcq-accent, #6d4aff);
  border-top: 1px solid #dce6f2;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(35, 72, 125, .08);
}

.web-book-content.web-smart-content .web-mcq-card > .web-mcq-question {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  margin: 0;
  padding: 8px 10px 10px 52px;
  color: #142846;
  background: transparent;
  border: 0;
  font-size: 1.02em;
  font-weight: 800;
  line-height: 1.55;
  position: relative;
}

.web-book-content.web-smart-content .web-mcq-card > .web-mcq-question::before {
  content: counter(lecture-mcq, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--mcq-accent, #6748ed), #8b4df4);
  border-radius: 10px;
  box-shadow: 0 7px 16px color-mix(in srgb, var(--mcq-accent, #6748ed) 22%, transparent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .02em;
  vertical-align: initial;
}

.web-book-content.web-smart-content .web-mcq-card > .web-mcq-source {
  grid-column: 1;
  grid-row: 2;
  margin: -2px 0 4px 52px;
  padding: 0 10px;
  color: #8b6a40;
  font-size: .78em;
  font-style: italic;
}

.web-book-content.web-smart-content .web-mcq-options {
  grid-column: 1;
  grid-row: 3;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 7px 10px 6px 52px;
}

.web-book-content.web-smart-content .web-mcq-option {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 7px 10px;
  color: #40536d;
  background: #fff;
  border: 0;
  border-left: 0;
  border-radius: 9px;
  font-size: .90em;
  line-height: 1.52;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.web-book-content.web-smart-content .web-mcq-option:hover {
  color: #173c70;
  background: #f3f8ff;
  transform: translateX(2px);
}

.web-book-content.web-smart-content .web-mcq-answer {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  margin: 0;
  padding: 9px 12px;
  color: #148251;
  background: linear-gradient(135deg, #eafbf2, #f7fffb);
  border: 1px solid #b9e9cf;
  border-radius: 10px;
  font-size: .88em;
  font-weight: 800;
  line-height: 1.5;
}

.web-book-content.web-smart-content .web-mcq-explanation,
.web-book-content.web-smart-content .web-mcq-explanation-text {
  grid-column: 2;
  min-width: 0;
  margin: 8px 0 0;
  padding: 11px 12px;
  color: #465870;
  background: linear-gradient(145deg, #f7f4ff, #f8fbff);
  border: 1px solid #d9dcf2;
  border-left: 3px solid #7654d8;
  border-radius: 10px;
  font-size: .87em;
  font-weight: 500;
  line-height: 1.68;
  overflow-wrap: anywhere;
}

.web-book-content.web-smart-content .web-mcq-explanation {
  color: #5d43a5;
  background: linear-gradient(145deg, #f5f1ff, #f8fbff);
  font-weight: 800;
}

/* Put explanation blocks below the answer without affecting non-MCQ lecture content. */
.web-book-content.web-smart-content .web-mcq-card > .web-mcq-answer ~ .web-mcq-explanation,
.web-book-content.web-smart-content .web-mcq-card > .web-mcq-answer ~ .web-mcq-explanation-text {
  grid-row: auto;
}

.web-book-content.web-smart-content .web-mcq-card > :last-child {
  margin-bottom: 0;
}

/* Existing smart renderer may group MCQs in a 2-column lecture grid.
   Quiz/Exam-style cards need full reading width, so only that MCQ grid is flattened. */
.web-book-content.web-smart-content .web-mcq-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (max-width: 900px) {
  .web-book-content.web-smart-content .web-mcq-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding: 11px;
  }

  .web-book-content.web-smart-content .web-mcq-card > .web-mcq-question,
  .web-book-content.web-smart-content .web-mcq-card > .web-mcq-source,
  .web-book-content.web-smart-content .web-mcq-options,
  .web-book-content.web-smart-content .web-mcq-answer,
  .web-book-content.web-smart-content .web-mcq-explanation,
  .web-book-content.web-smart-content .web-mcq-explanation-text {
    grid-column: 1;
    grid-row: auto;
  }

  .web-book-content.web-smart-content .web-mcq-card > .web-mcq-source {
    margin-left: 52px;
  }

  .web-book-content.web-smart-content .web-mcq-options {
    padding-left: 52px;
  }

  .web-book-content.web-smart-content .web-mcq-answer {
    margin-top: 8px;
  }
}

@media (max-width: 560px) {
  .web-book-content.web-smart-content .web-mcq-card {
    padding: 9px;
    border-radius: 13px;
  }

  .web-book-content.web-smart-content .web-mcq-card > .web-mcq-question {
    padding: 7px 7px 8px 44px;
    font-size: .96em;
  }

  .web-book-content.web-smart-content .web-mcq-card > .web-mcq-question::before {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: 11px;
  }

  .web-book-content.web-smart-content .web-mcq-card > .web-mcq-source {
    margin-left: 44px;
    padding-left: 7px;
    padding-right: 7px;
  }

  .web-book-content.web-smart-content .web-mcq-options {
    padding: 6px 7px 4px 44px;
    gap: 4px;
  }

  .web-book-content.web-smart-content .web-mcq-option {
    padding: 6px 8px;
  }

  .web-book-content.web-smart-content .web-mcq-answer,
  .web-book-content.web-smart-content .web-mcq-explanation,
  .web-book-content.web-smart-content .web-mcq-explanation-text {
    margin-left: 0;
    margin-right: 0;
  }
}


/* ========================================================================
   MCQ EXACT QUIZ/EXAM LAYOUT — isolated to renderer-created wrappers only.
   ======================================================================== */
.web-book-content.web-smart-content .web-mcq-card.web-mcq-quiz-layout{
  display:grid!important;
  grid-template-columns:minmax(0,1.06fr) minmax(290px,.94fr)!important;
  gap:13px!important;
  align-items:stretch!important;
  min-height:0!important;
  padding:13px!important;
}
.web-book-content.web-smart-content .web-mcq-quiz-layout>.web-mcq-left,
.web-book-content.web-smart-content .web-mcq-quiz-layout>.web-mcq-right{
  min-width:0;
}
.web-book-content.web-smart-content .web-mcq-quiz-layout>.web-mcq-left{
  display:grid;
  grid-template-columns:42px minmax(0,1fr);
  grid-template-rows:auto auto 1fr;
  column-gap:12px;
  align-content:start;
}
.web-book-content.web-smart-content .web-mcq-quiz-layout>.web-mcq-left>.web-mcq-question{
  grid-column:1/-1!important;
  grid-row:auto!important;
  padding:7px 8px 8px 54px!important;
  margin:0!important;
  min-height:44px;
  border:0!important;
  background:transparent!important;
  color:#152544!important;
  font-size:16.5px!important;
  line-height:1.48!important;
  font-weight:850!important;
}
.web-book-content.web-smart-content .web-mcq-quiz-layout>.web-mcq-left>.web-mcq-question::before{
  left:0!important;top:1px!important;width:42px!important;height:42px!important;border-radius:11px!important;
  display:grid!important;place-items:center!important;
  background:var(--mcq-accent,#6d4ee7)!important;color:#fff!important;
  font-size:14px!important;font-weight:950!important;
}
.web-book-content.web-smart-content .web-mcq-quiz-layout>.web-mcq-left>.web-mcq-source{
  grid-column:2!important;grid-row:auto!important;margin:-2px 0 3px!important;padding:0 8px!important;
  color:#8b6a40!important;font-size:11px!important;
}
.web-book-content.web-smart-content .web-mcq-quiz-layout>.web-mcq-left>.web-mcq-options{
  grid-column:2!important;grid-row:auto!important;display:grid!important;grid-template-columns:1fr!important;
  gap:5px!important;margin:0!important;padding:4px 8px 5px!important;align-content:start!important;
}
.web-book-content.web-smart-content .web-mcq-quiz-layout .web-mcq-option{
  margin:0!important;padding:3px 0!important;border:0!important;background:transparent!important;
  color:#34465d!important;font-size:13px!important;line-height:1.35!important;
}
.web-book-content.web-smart-content .web-mcq-quiz-layout .web-mcq-option.is-answer{
  color:#0c6f4b!important;font-weight:800!important;
}
.web-book-content.web-smart-content .web-mcq-quiz-layout .web-mcq-option.is-answer::first-letter{color:#0c6f4b}
.web-book-content.web-smart-content .web-mcq-quiz-layout>.web-mcq-right{
  display:flex!important;flex-direction:column!important;gap:7px!important;min-height:0!important;
}
.web-book-content.web-smart-content .web-mcq-quiz-layout>.web-mcq-right>.web-mcq-answer{
  grid-column:auto!important;grid-row:auto!important;margin:0!important;padding:8px 10px!important;
  border-radius:10px!important;background:#eafbf1!important;border:1px solid #bfeacc!important;
  color:#12915c!important;font-size:12.5px!important;font-weight:900!important;line-height:1.45!important;
}
.web-book-content.web-smart-content .web-mcq-explanation-pane{
  flex:1;min-height:120px;max-height:235px;overflow:auto;padding:10px 11px;
  border:1px solid color-mix(in srgb,var(--mcq-accent,#6d4ee7) 18%,#dfe7f1);
  border-radius:10px;background:linear-gradient(135deg,var(--mcq-soft,#f4f0ff),#fbfaff);
  scrollbar-width:thin;
}
.web-book-content.web-smart-content .web-mcq-explanation-pane>.web-mcq-explanation,
.web-book-content.web-smart-content .web-mcq-explanation-pane>.web-mcq-explanation-text{
  display:block!important;grid-column:auto!important;grid-row:auto!important;margin:0!important;padding:5px 0!important;
  border:0!important;border-radius:0!important;background:transparent!important;color:#39495e!important;
  font-size:12.5px!important;line-height:1.63!important;font-weight:500!important;
}
.web-book-content.web-smart-content .web-mcq-explanation-pane>.web-mcq-explanation{
  color:var(--mcq-accent,#6d4ee7)!important;font-size:14px!important;font-weight:900!important;padding-top:0!important;
}
.web-book-content.web-smart-content .web-mcq-explanation-pane>.web-mcq-explanation-text + .web-mcq-explanation-text{
  border-top:1px dashed rgba(88,105,135,.14)!important;
}
@media(max-width:900px){
  .web-book-content.web-smart-content .web-mcq-card.web-mcq-quiz-layout{grid-template-columns:1fr!important;}
  .web-book-content.web-smart-content .web-mcq-explanation-pane{max-height:none;min-height:0;}
}
@media(max-width:560px){
  .web-book-content.web-smart-content .web-mcq-card.web-mcq-quiz-layout{padding:10px!important;gap:9px!important;}
  .web-book-content.web-smart-content .web-mcq-quiz-layout>.web-mcq-left{grid-template-columns:36px minmax(0,1fr);column-gap:8px;}
  .web-book-content.web-smart-content .web-mcq-quiz-layout>.web-mcq-left>.web-mcq-question{padding-left:44px!important;font-size:15px!important;}
  .web-book-content.web-smart-content .web-mcq-quiz-layout>.web-mcq-left>.web-mcq-question::before{width:34px!important;height:34px!important;font-size:11px!important;}
  .web-book-content.web-smart-content .web-mcq-quiz-layout>.web-mcq-left>.web-mcq-source,
  .web-book-content.web-smart-content .web-mcq-quiz-layout>.web-mcq-left>.web-mcq-options{grid-column:1/-1!important;margin-left:44px!important;padding-left:0!important;}
}
