/*
Theme Name: Dethithuaz V3
Theme URI: https://dethithuaz.com
Author: Dethithuaz Team
Description: Giao dien WordPress V3 cho De Thi Thu AZ - Kho de thi, tai lieu hoc tap, thi thu truc tuyen va 10 cong cu hoc tap tuong tac. Toi uu SEO & PageSpeed.
Version: 3.0.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: dethithuaz-v3
*/

/* WordPress Content & V3 Theme Enhancements */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.article-content img,
.article-content figure {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 14px 0;
}

.article-content figure.wp-block-table,
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  overflow-x: auto;
  display: block;
}

.article-content table th,
.article-content table td {
  border: 1px solid var(--line, #e7edf5);
  padding: 10px 12px;
  text-align: left;
  font-size: 14.5px;
}

.article-content table th {
  background: var(--blue-soft, #eef4ff);
  color: var(--navy, #0b2d6b);
  font-weight: 700;
}

.article-content blockquote {
  margin: 16px 0;
  padding: 14px 18px;
  background: #f8faff;
  border-left: 4px solid var(--orange, #ff8a00);
  border-radius: 0 12px 12px 0;
  color: var(--ink, #1c3153);
}

.article-content h2,
.article-content h3 {
  scroll-margin-top: 96px;
}

.article-content h2 {
  margin-top: 26px;
  margin-bottom: 10px;
  color: var(--navy, #0b2d6b);
  font-size: 20px;
}

.article-content h3 {
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--ink, #1c3153);
  font-size: 17px;
}

/* Inline mobile TOC inside article */
.inline-toc {
  background: #f8faff;
  border: 1px solid var(--line, #e7edf5);
  border-radius: 14px;
  padding: 14px 18px;
  margin: 16px 0 22px;
}

.inline-toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 800;
  color: var(--navy, #0b2d6b);
  cursor: pointer;
}

.inline-toc-list {
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.inline-toc-list.collapsed {
  display: none;
}

.inline-toc-list li.toc-h3 {
  margin-left: 14px;
  font-size: 13.5px;
}

.inline-toc-list a {
  color: var(--ink, #1c3153);
  text-decoration: none;
}

.inline-toc-list a:hover {
  color: var(--orange, #ff8a00);
}

.side-toc a.toc-sub {
  padding-left: 14px;
  font-size: 13px;
  opacity: 0.88;
}

/* Download / Tai lieu box */
.tai-lieu-box {
  margin: 22px 0;
  padding: 18px 20px;
  background: linear-gradient(135deg, #eef4ff 0%, #fff6ea 100%);
  border: 1px solid #ffd5a3;
  border-radius: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tai-lieu-box strong {
  display: block;
  color: var(--navy, #0b2d6b);
  font-size: 16px;
  margin-bottom: 4px;
}

.tai-lieu-box span {
  font-size: 13.5px;
  color: var(--muted, #697b96);
}

/* WordPress Pagination styled like V3 */
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line, #e7edf5);
  background: #fff;
  color: var(--ink, #1c3153);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.pagination .page-numbers:hover {
  border-color: #ffc98c;
  background: #fff4e7;
  color: #a85000;
}

.pagination .page-numbers.current {
  background: var(--navy, #0b2d6b);
  border-color: var(--navy, #0b2d6b);
  color: #fff;
}

/* Active tab panels on front-page */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: grid;
}

/* Breadcrumb link & current */
.bread a {
  text-decoration: none;
}

/* Hero image / Featured thumb in single post */
.article-featured-img {
  margin: 14px 0 18px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line, #e7edf5);
}

.article-featured-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* WordPress nav-wrap submenus / clean flex */
.top-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-nav li {
  margin: 0;
}

/* Align V3 header button as <a> */
a.header-explore {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-shortcuts a.hero-shortcut-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid #ffae6c77;
  color: #fff5e8;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}

.hero-shortcuts a.hero-shortcut-link:hover {
  background: #ff8a0033;
}

/* Real Post Thumbnails inside .resource-card */
.doc-thumb.has-img {
  padding: 0;
  overflow: hidden;
  background: #eef4ff;
  display: block;
}

.resource-card > .doc-thumb {
  width: 250px;
  height: 170px;
  flex: 0 0 250px;
  border-radius: 12px;
}

.related-row .doc-thumb {
  width: 56px;
  height: 50px;
  flex: none;
}

.doc-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 680px) {
  .resource-card {
    flex-wrap: wrap;
  }
  .resource-card > .doc-thumb {
    width: 100%;
    height: 170px;
    flex: none;
  }
}

/* Prevent WP Admin Bar from overlapping sticky header when logged in */
.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

/* Auth Portal & Gated Exam Result */
.auth-pane {
  display: none;
}

.auth-pane.active {
  display: block;
}

.v3-gate-card {
  margin-top: 22px;
  padding: 26px 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, #eef4ff 0%, #fff5e8 100%);
  border: 1px solid #ffd5a3;
  text-align: center;
}

.v3-gate-card h3 {
  color: var(--navy, #0b2d6b);
  margin: 0 0 8px;
  font-size: 20px;
}

.v3-gate-card p {
  color: var(--ink, #1c3153);
  max-width: 560px;
  margin: 0 auto 16px;
}

.v3-gate-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Phase 1 Tools Enhancements */
.v3-element.is-dimmed {
  opacity: 0.22;
  filter: grayscale(0.6);
}
.v3-p-legend span[data-v3-pcat] {
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.v3-p-legend span[data-v3-pcat].active {
  border-color: var(--navy, #0b2d6b);
  background: #eef4ff;
  font-weight: 700;
}
.v3-compare-box {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line, #e7edf5);
}
.v3-compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 13.5px;
}
.v3-compare-table th,
.v3-compare-table td {
  border: 1px solid var(--line, #e7edf5);
  padding: 7px 10px;
  text-align: left;
}
.v3-compare-table th {
  background: #f8faff;
  color: var(--navy, #0b2d6b);
}
.v3-practice-eq {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 14px;
  background: #f8faff;
  border: 1px solid var(--line, #e7edf5);
  border-radius: 12px;
  margin: 12px 0;
  font-weight: 700;
}
.v3-practice-eq input {
  width: 54px;
  padding: 6px;
  text-align: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-weight: 800;
  color: var(--navy, #0b2d6b);
}
.v3-molar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}
.v3-molar-chip {
  background: #eef4ff;
  color: #0b2d6b;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}
.v3-region-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.v3-region-pills button {
  border: 1px solid var(--line, #e7edf5);
  background: #fff;
  color: var(--ink, #1c3153);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.v3-region-pills button.active {
  background: var(--navy, #0b2d6b);
  color: #fff;
  border-color: var(--navy, #0b2d6b);
}
.v3-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 10px;
  background: #f8faff;
  border: 1px solid var(--line, #e7edf5);
  border-radius: 12px;
}
.v3-atlas-top-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.v3-atlas-top-row .v3-atlas-tabs {
  margin-bottom: 0;
}
.v3-region-select {
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: var(--navy, #0b2d6b);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.v3-map-layers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink, #1c3153);
}
.v3-layer-chip {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #d5e4f6;
  background: #fff;
  color: var(--ink, #1c3153);
  white-space: nowrap;
  cursor: pointer;
  margin: 0 !important;
  transition: all 0.15s ease;
}
.v3-layer-chip:hover {
  border-color: #ffba60;
}
.v3-layer-chip.is-on {
  background: #eef4ff;
  border-color: var(--navy, #0b2d6b);
  color: var(--navy, #0b2d6b);
  font-weight: 700;
}
.v3-layer-chip input {
  margin: 0;
  width: auto !important;
  accent-color: var(--navy, #0b2d6b);
}
.v3-map-float-ctrl {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  padding: 5px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 14px rgba(11, 45, 107, 0.12);
}
.v3-map-float-ctrl button {
  height: 28px;
  min-width: 28px;
  padding: 0 7px;
  border-radius: 7px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--navy, #0b2d6b);
  font-weight: 800;
  font-size: 12.5px;
  cursor: pointer;
}
.v3-map-float-ctrl button:hover {
  background: #eef4ff;
}
.v3-map-float-ctrl button.is-active {
  background: var(--navy, #0b2d6b);
  color: #fff;
  border-color: var(--navy, #0b2d6b);
}
.v3-detail-grid {
  display: grid;
  gap: 7px;
  margin: 10px 0;
}
.v3-detail-row {
  background: #f8faff;
  border: 1px solid #e7edf5;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12.8px;
  line-height: 1.45;
}
.v3-detail-row b {
  color: var(--navy, #0b2d6b);
  display: block;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}
.v3-tool-group {
  margin-top: 24px;
}
.v3-tool-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e7edf5;
}
.v3-tool-group-head h2 {
  margin: 0;
  font-size: 18px;
  color: var(--navy, #0b2d6b);
}
.v3-tool-group-head span {
  font-size: 12.5px;
  font-weight: 700;
  color: #697b96;
  background: #eef4ff;
  padding: 3px 10px;
  border-radius: 999px;
}
.v3-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 16px 0 24px;
}
.v3-timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #0b2d6b 0%, #2563eb 50%, #ff8a00 100%);
  border-radius: 999px;
}
.v3-tl-era {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin: 6px 0 2px;
}
.v3-tl-era span {
  background: linear-gradient(135deg, #0b2d6b, #1d4ed8);
  color: #fff;
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  padding: 6px 16px;
  border-radius: 999px;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(11, 45, 107, 0.18);
}
.v3-tl-item {
  position: relative;
  width: calc(50% - 34px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8faff;
  border: 1.5px solid #dbe6f5;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.v3-tl-item:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 10px 24px rgba(11, 45, 107, 0.1);
}
.v3-tl-item.is-left {
  align-self: flex-start;
}
.v3-tl-item.is-right {
  align-self: flex-end;
}
/* Horizontal branch line connecting node to central spine */
.v3-tl-item::before {
  content: "";
  position: absolute;
  top: 22px;
  width: 24px;
  height: 2px;
  border-top: 2px dashed #60a5fa;
}
.v3-tl-item.is-left::before {
  right: -26px;
}
.v3-tl-item.is-right::before {
  left: -26px;
}
/* Node marker + downward flow arrow on the central spine */
.v3-tl-node {
  position: absolute;
  top: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--navy, #0b2d6b);
  color: var(--orange, #ff8a00);
  font-size: 13px;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(11, 45, 107, 0.2);
}
.v3-tl-item.is-left .v3-tl-node {
  right: -46px;
}
.v3-tl-item.is-right .v3-tl-node {
  left: -46px;
}
.v3-tl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.v3-tl-year {
  display: inline-block;
  background: var(--navy, #0b2d6b);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 8px;
  text-align: center;
}
.v3-tl-step {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 999px;
}
.v3-tl-body {
  font-size: 14px;
  color: var(--ink, #1c3153);
  line-height: 1.5;
}
.v3-tl-title {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--navy, #0b2d6b);
  margin-bottom: 4px;
}
.v3-tl-sig {
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff7ed;
  border-left: 3px solid var(--orange, #ff8a00);
  font-size: 12.8px;
  color: #7c2d12;
}
.v3-tl-item.is-world {
  border-color: #c7d2fe;
  background: #eef2ff;
}
.v3-tl-item.is-hot {
  border-color: #fdba74;
}
.v3-tl-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.v3-tl-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.v3-tl-badge.world {
  background: #dbeafe;
  color: #1e40af;
}
.v3-tl-badge.hot {
  background: #ffedd5;
  color: #c2410c;
}
.v3-ct-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 14px;
}
.v3-ct-workspace {
  display: grid;
  grid-template-columns: 370px 1fr;
  gap: 16px;
  align-items: start;
}
.v3-ct-sidebar {
  display: grid;
  gap: 8px;
  max-height: 760px;
  overflow-y: auto;
  padding-right: 4px;
}
.v3-ct-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.v3-ct-card.is-active {
  border-color: #2563eb;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.1);
}
.v3-ct-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  background: #f8fafc;
  cursor: pointer;
}
.v3-ct-card.is-active .v3-ct-card-head {
  background: #eff6ff;
}
.v3-ct-card-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.v3-ct-card-summary strong {
  font-size: 13px;
  color: #0b2d6b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v3-ct-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.v3-ct-card-body {
  padding: 10px 12px 12px;
  display: grid;
  gap: 8px;
  border-top: 1px solid #e2e8f0;
}
.v3-ct-card-body input,
.v3-ct-card-body textarea,
.v3-ct-card-body select,
.v3-ct-title-input,
.v3-ct-import {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  background: #fff;
}
.v3-ct-card-body textarea {
  resize: vertical;
  min-height: 58px;
}
.v3-ct-colors {
  display: flex;
  gap: 6px;
  align-items: center;
}
.v3-ct-cbtn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #cbd5e1;
  cursor: pointer;
  padding: 0;
}
.v3-ct-cbtn.active {
  box-shadow: 0 0 0 2px #0b2d6b;
  transform: scale(1.1);
}
.v3-ct-preview {
  background: #fff;
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  padding: 18px 18px 24px;
  min-height: 460px;
}
.v3-tl-item.is-selectable {
  cursor: pointer;
}
.v3-tl-item.is-selected {
  box-shadow: 0 0 0 2.5px #2563eb, 0 10px 24px rgba(37, 99, 235, 0.14);
}
/* Compact single-spine layout option */
.v3-timeline.is-compact::before {
  left: 16px;
  transform: none;
}
.v3-timeline.is-compact .v3-tl-item,
.v3-timeline.is-compact .v3-tl-item.is-left,
.v3-timeline.is-compact .v3-tl-item.is-right {
  width: calc(100% - 42px);
  align-self: flex-end;
}
.v3-timeline.is-compact .v3-tl-item::before {
  left: -18px;
  right: auto;
  width: 16px;
}
.v3-timeline.is-compact .v3-tl-node {
  left: -38px;
  right: auto;
}
.v3-print-title {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--navy, #0b2d6b);
  margin: 4px 0 10px;
}
@media (max-width: 960px) {
  .v3-ct-workspace {
    grid-template-columns: 1fr;
  }
  .v3-ct-sidebar {
    max-height: none;
  }
}
@media (max-width: 820px) {
  .v3-ct-grid {
    grid-template-columns: 1fr;
  }
  .v3-timeline::before {
    left: 16px;
    transform: none;
  }
  .v3-tl-era {
    justify-content: flex-start;
    padding-left: 36px;
  }
  .v3-tl-item,
  .v3-tl-item.is-left,
  .v3-tl-item.is-right {
    width: calc(100% - 42px);
    align-self: flex-end;
  }
  .v3-tl-item.is-left::before,
  .v3-tl-item.is-right::before {
    left: -18px;
    right: auto;
    width: 16px;
  }
  .v3-tl-item.is-left .v3-tl-node,
  .v3-tl-item.is-right .v3-tl-node {
    left: -38px;
    right: auto;
  }
}
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  header, footer, nav, #wpadminbar, .site-header, .site-footer, .v3-hero, .v3-no-print, .tabs {
    display: none !important;
  }
  body, main, .v3-panel, .v3-wrap {
    background: #fff !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .v3-ct-workspace {
    display: block !important;
  }
  .v3-ct-preview {
    border: none !important;
    padding: 0 !important;
  }
  .v3-tl-item {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none !important;
  }
  .v3-tl-era {
    break-after: avoid;
    page-break-after: avoid;
  }
}
.v3-base-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.v3-base-card {
  background: #f8faff;
  border: 1.5px solid #dbe6f5;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.v3-base-card.is-src {
  border-color: #2563eb;
  background: #eff6ff;
}
.v3-base-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}
.v3-base-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px;
  font-weight: 800;
  color: var(--navy, #0b2d6b);
  word-break: break-all;
}
.v3-bit-wrap {
  margin-top: 16px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.v3-bit-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.v3-bit-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  transition: all 0.14s ease;
}
.v3-bit-cell.is-one {
  background: #0b2d6b;
  border-color: #0b2d6b;
  color: #fff;
}
.v3-bit-cell span {
  font-size: 10.5px;
  opacity: 0.75;
}
.v3-bit-cell strong {
  font-family: ui-monospace, monospace;
  font-size: 16px;
}
.v3-base-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.v3-flash-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 14px;
}
.v3-flash-bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0b2d6b, #ff8a00);
  border-radius: 999px;
  transition: width 0.25s ease;
}
.v3-flash-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.v3-flash-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  text-align: left;
}
.v3-flash-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: #f8faff;
  border: 1px solid #dbe6f5;
  border-radius: 10px;
  font-size: 13.5px;
}
@media (max-width: 720px) {
  .v3-flash-row {
    grid-template-columns: 1fr;
  }
}
.v3-fsec {
  margin-top: 26px;
}
.v3-fsec-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--navy, #0b2d6b);
  margin: 0 0 14px;
  padding-left: 12px;
  border-left: 4px solid var(--orange, #ff8a00);
}
.v3-fgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 820px) {
  .v3-fgrid {
    grid-template-columns: 1fr;
  }
}
.v3-fcard {
  background: #fff;
  border: 1px solid #dce5f2;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 14px rgba(11, 45, 107, 0.045);
}
.v3-fcard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.v3-fcard-head strong {
  color: var(--navy, #0b2d6b);
  font-size: 15.5px;
}
.v3-fbox {
  background: #f8faff;
  border: 1px solid #dce6f5;
  border-radius: 12px;
  padding: 6px 14px;
  font-family: 'Cambria Math', 'Times New Roman', Georgia, serif;
  font-size: 16px;
  color: #0b2d6b;
  font-weight: 600;
  overflow-x: auto;
}
.v3-frow {
  padding: 8px 0;
  line-height: 1.6;
  white-space: nowrap;
}
.v3-frow + .v3-frow {
  border-top: 1px dashed #d5e1f2;
}
.v3-fmeta {
  font-size: 13px;
  color: #5b6e8c;
  line-height: 1.5;
  padding-top: 2px;
}
.admin-bar .v3-page {
  padding-top: 24px;
}

/* Formula Card Hover & Modal Popup */
.v3-fcard {
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.v3-fcard:hover {
  transform: translateY(-2px);
  border-color: #ffba60;
  box-shadow: 0 8px 22px rgba(11, 45, 107, 0.09);
}
.v3-fcard-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
}
.v3-fhint {
  font-size: 12px;
  font-weight: 700;
  color: #d26a00;
  white-space: nowrap;
}
.v3-fmodal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(9, 25, 56, 0.56);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.v3-fmodal {
  background: #fff;
  width: 100%;
  max-width: 660px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 20px;
  padding: 24px 26px;
  box-shadow: 0 24px 60px rgba(9, 25, 56, 0.28);
  animation: v3ModalIn 0.16s ease-out;
}
@keyframes v3ModalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.v3-fmodal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.v3-fmodal-head h2 {
  margin: 6px 0 0;
  font-size: 20px;
  color: var(--navy, #0b2d6b);
}
.v3-fmodal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #f8faff;
  color: var(--navy, #0b2d6b);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.v3-fmodal-sec {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8faff;
  border: 1px solid #e2e8f0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink, #1c3153);
}
.v3-fmodal-sec.is-example {
  background: #fff9f2;
  border-color: #ffd5a3;
}
.v3-fmodal-sec h4 {
  margin: 0 0 6px;
  font-size: 13.5px;
  color: var(--navy, #0b2d6b);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.v3-fmodal-sec.is-example h4 {
  color: #b45309;
}

/* DNA Transcription & Codon Alignment */
.v3-dna-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 4px;
}
.v3-codon-col {
  min-width: 96px;
  flex: 0 0 auto;
  border: 1px solid #dce5f2;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  text-align: center;
  font-size: 12.5px;
}
.v3-codon-head {
  background: #eef4ff;
  color: var(--navy, #0b2d6b);
  font-weight: 800;
  padding: 4px 6px;
  font-size: 11px;
}
.v3-codon-row {
  padding: 5px 6px;
  border-top: 1px dashed #e7edf5;
  font-family: monospace;
  font-size: 13.5px;
  font-weight: 700;
}
.v3-codon-aa {
  padding: 6px;
  border-top: 1px solid #e2e8f0;
  background: #fff9f2;
  color: #b45309;
  font-weight: 800;
  font-size: 12px;
}
.v3-codon-aa.is-start {
  background: #ecfdf5;
  color: #047857;
}
.v3-codon-aa.is-stop {
  background: #fef2f2;
  color: #b91c1c;
}
.v3-b-A { color: #15803d; }
.v3-b-T, .v3-b-U { color: #dc2626; }
.v3-b-G { color: #d97706; }
.v3-b-C, .v3-b-X { color: #1d4ed8; }

.v3-panel input[type="checkbox"],
.v3-panel input[type="radio"] {
  width: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  accent-color: var(--navy, #0b2d6b);
}
.v3-codon-labels {
  min-width: 128px;
  flex: 0 0 auto;
  border: 1px solid #dce5f2;
  border-radius: 12px;
  background: #f8faff;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy, #0b2d6b);
}
.v3-codon-labels > div {
  padding: 5px 10px;
  border-top: 1px dashed #e7edf5;
  white-space: nowrap;
}
.v3-codon-labels > div:first-child {
  border-top: 0;
  background: #eef4ff;
  padding: 4px 10px;
  font-size: 11px;
}

/* English Hub Styling */
.v3-eng-alpha {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}
.v3-eng-alpha button {
  min-width: 30px;
  height: 28px;
  padding: 0 7px;
  border-radius: 8px;
  border: 1px solid #dce5f2;
  background: #fff;
  color: var(--ink, #1c3153);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}
.v3-eng-alpha button.active {
  background: var(--navy, #0b2d6b);
  color: #fff;
  border-color: var(--navy, #0b2d6b);
}
.v3-speak-btn {
  border: 1px solid #d5e4f6;
  background: #eef4ff;
  color: var(--navy, #0b2d6b);
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 12px;
  cursor: pointer;
}
.v3-speak-btn:hover {
  background: #ff8a00;
  color: #fff;
  border-color: #ff8a00;
}
.v3-tense-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 820px) {
  .v3-tense-grid {
    grid-template-columns: 1fr;
  }
}
.v3-tense-card {
  background: #fff;
  border: 1px solid #dce5f2;
  border-radius: 14px;
  padding: 15px 17px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.v3-tense-card h3 {
  margin: 0;
  font-size: 15.5px;
  color: var(--navy, #0b2d6b);
}
.v3-tense-form {
  background: #f8faff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.65;
  font-family: monospace;
  color: #0b2d6b;
}
.v3-fcopy {
  background: none;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11.5px;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
}
.v3-fcopy:hover {
  background: #eef4ff;
  color: var(--navy, #0b2d6b);
}
.v3-map-holder {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  cursor: grab;
  user-select: none;
}
.v3-map-holder:active {
  cursor: grabbing;
}
.v3-prov-poly {
  transition: fill 0.15s ease;
}
.v3-prov-poly:hover {
  fill: rgba(255, 138, 0, 0.25);
}
.side-cta a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  line-height: 1.3;
  padding: 10px 15px;
  color: #0b2d6b;
}
.side-cta a .svg-icon {
  width: 16px;
  height: 16px;
  color: currentColor;
}

/* Homepage artwork: replace the existing decorative areas only. */
.hero.home-hero-scene {
  background: #f7f8fa;
  color: #12315f;
  border: 1px solid #e0e6ef;
  box-shadow: 0 14px 35px rgba(28, 48, 78, .06);
}
.home-hero-scene::before,
.home-hero-scene::after {
  display: none;
}
.home-hero-scene h1 {
  color: #12315f;
}
.home-hero-scene h1 em {
  color: #b85a00;
}
.home-hero-scene .hero-copy > p {
  color: #53617a;
}
.home-hero-scene .hero-label {
  color: #88501b;
  background: #fff1df;
  border-color: #ecd7bc;
}
.home-hero-scene .hero-search {
  border: 1px solid #d9e1ed;
  box-shadow: 0 6px 18px rgba(20, 48, 88, .06);
}
.home-hero-scene .hero-shortcuts {
  color: #68778d;
}
.home-hero-scene .hero-shortcuts a.hero-shortcut-link {
  color: #28456e;
  border-color: #d5deea;
  background: rgba(255, 255, 255, .8);
}
.home-hero-scene .hero-shortcuts a.hero-shortcut-link:hover {
  background: #fff0dc;
  border-color: #efba76;
}
.home-hero-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}
.home-hero-visual {
  position: absolute;
  inset: 0 0 0 auto;
  width: 53%;
  height: 100%;
  z-index: 1;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 27%);
  mask-image: linear-gradient(to right, transparent, #000 27%);
}
.home-exam-feature {
  isolation: isolate;
  background: #f5f8fc;
  color: #12315f;
  border: 1px solid #dfe6f0;
}
.home-exam-feature::after {
  display: none;
}
.home-exam-art {
  position: absolute;
  width: 50%;
  height: 100%;
  right: 0;
  bottom: 0;
  object-fit: cover;
  object-position: right center;
  pointer-events: none;
  z-index: -1;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 28%);
  mask-image: linear-gradient(to right, transparent, #000 28%);
}
.home-exam-feature > strong,
.home-exam-feature > span:not(.v3-mini-tag) {
  max-width: 66%;
}
.home-exam-feature > span:not(.v3-mini-tag) {
  max-width: 46%;
  color: #5a6c86;
}
.home-exam-feature .v3-mini-tag {
  position: relative;
  z-index: 1;
  color: #8b5014;
  background: #ffefd9;
  border-color: #ecd4b4;
}
.v3-feature-smalls .home-tool-art {
  display: block;
  width: 100%;
  height: 112px;
  object-fit: contain;
  pointer-events: none;
}
.home-story-art::before,
.home-story-art::after {
  display: none;
}
.home-story-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.home-closing-banner > div,
.home-closing-banner > a {
  position: relative;
  z-index: 1;
}
.home-saved-art {
  position: absolute;
  height: 100%;
  width: 150px;
  right: 260px;
  top: 0;
  object-fit: contain;
  opacity: .48;
  pointer-events: none;
}
@media (min-width: 1101px) {
  .home-exam-feature > strong {
    font-size: clamp(23px, 1.95vw, 27px);
  }
}
@media (max-width: 1100px) {
  .home-exam-art {
    width: 46%;
    height: 100%;
    right: 0;
  }
  .home-exam-feature > strong,
  .home-exam-feature > span:not(.v3-mini-tag) {
    max-width: 65%;
  }
}
@media (max-width: 980px) {
  .home-saved-art {
    display: none;
  }
}
@media (max-width: 570px) {
  /* Keep the existing navigation controls inside the phone viewport. */
  .site-header .header-main {
    gap: 8px;
  }
  .site-header .header-actions {
    gap: 6px;
  }
  .site-header .header-actions .btn-outline {
    padding: 8px !important;
    font-size: 12px !important;
  }
  .site-header .header-actions .icon-button {
    width: 34px;
    height: 34px;
  }
  .site-header .header-explore {
    display: none;
  }
  .home-exam-art {
    width: 42%;
    height: auto;
    right: 0;
    bottom: 0;
    opacity: 1;
    object-fit: contain;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 38%), linear-gradient(to bottom, transparent, #000 28%);
    mask-image: linear-gradient(to right, transparent, #000 38%), linear-gradient(to bottom, transparent, #000 28%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
  }
  .home-exam-feature > strong,
  .home-exam-feature > span:not(.v3-mini-tag) {
    max-width: 82%;
  }
  .home-exam-feature > span:not(.v3-mini-tag) {
    max-width: 55%;
  }
  .v3-feature-smalls .home-tool-art {
    height: 92px;
  }
  .v3-feature-smalls > a:last-child .home-tool-art {
    width: 125px;
    align-self: center;
  }
}

/* Shared light scene treatment for the seven requested section headers. */
.v3-page-head.section-banner,
.catalog-header.section-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #f7f8fa;
  border: 1px solid #e0e6ef;
  color: #12315f;
  min-height: 164px;
  box-shadow: 0 8px 24px rgba(28, 48, 78, .035);
}
.section-banner::before,
.section-banner::after {
  display: none;
}
.section-banner .section-banner-copy {
  position: relative;
  z-index: 1;
  width: 66%;
  max-width: 66%;
  min-width: 0;
  flex: 0 1 66%;
}
.section-banner .section-banner-art {
  position: absolute;
  inset: 0 0 0 auto;
  display: block;
  width: 43%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 30%);
  mask-image: linear-gradient(to right, transparent, #000 30%);
}
.section-banner h1 {
  color: #12315f;
}
.section-banner p {
  color: #586982;
}
.section-banner .v3-eyebrow {
  color: #97550e;
}
@media (max-width: 980px) {
  .section-banner .section-banner-copy {
    width: 70%;
    max-width: 70%;
    flex-basis: 70%;
  }
  .section-banner .section-banner-art {
    width: 40%;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 45%);
    mask-image: linear-gradient(to right, transparent, #000 45%);
  }
}
@media (max-width: 640px) {
  .v3-page-head.section-banner,
  .catalog-header.section-banner {
    min-height: 0;
  }
  .section-banner .section-banner-art {
    display: none;
  }
  .section-banner .section-banner-copy {
    width: 100%;
    max-width: 100%;
    flex-basis: 100%;
  }
}

/* Detail-tool artwork uses the shared light banner, including on mobile. */
.v3-page-head.tool-detail-banner { min-height: 190px; }
.tool-detail-banner.section-banner .section-banner-copy { width: 60%; max-width: 60%; flex-basis: 60%; }
.tool-detail-banner h1 { font-size: clamp(27px, 2.5vw, 36px); line-height: 1.25; }
@media (max-width: 640px) {
  .v3-page-head.tool-detail-banner {
    padding: 0; display: flex; flex-direction: column;
    align-items: stretch; gap: 16px; min-height: 0;
  }
  .tool-detail-banner.section-banner .section-banner-copy {
    width: 100%; max-width: 100%; flex: none; padding: 23px 20px 0;
  }
  .tool-detail-banner.section-banner .section-banner-art {
    display: block; position: relative; inset: auto;
    width: 100%; height: auto; aspect-ratio: 2 / 1; flex: none;
    object-fit: cover; -webkit-mask-image: none; mask-image: none;
  }
}

/* White labels on orange action buttons throughout the frontend. */
:is(.btn-primary, .v3-primary, a.header-explore, .hero-search button,
    .v3-feature-main em, .v3-calc-keypad button.is-equal),
:is(.btn-primary, .v3-primary, a.header-explore, .hero-search button,
    .v3-feature-main em, .v3-calc-keypad button.is-equal):is(:hover, :focus, :active, :disabled),
.v3-option.selected > span,
.header-save .counter {
  color: #fff;
}
:is(.btn-primary, .v3-primary, a.header-explore, .hero-search button,
    .v3-feature-main em, .v3-calc-keypad button.is-equal) .svg-icon {
  color: inherit;
}

/* A single, evenly padded search control across the catalog and archives. */
#catalogSearch {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 5px 5px 5px 16px;
  border: 1px solid #dce4ef;
  border-radius: 14px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
#catalogSearch:focus-within {
  border-color: #edaa5b;
  box-shadow: 0 0 0 3px rgba(255, 138, 0, .1);
}
#catalogSearch > .svg-icon {
  width: 19px;
  height: 19px;
  color: #8193ae;
}
#catalogSearch #catalogQuery {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #243c60;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: none;
}
#catalogSearch #catalogQuery:focus-visible {
  outline: none;
}
#catalogSearch #catalogQuery::placeholder {
  color: #8796ad;
  opacity: 1;
}
#catalogSearch .catalog-search-submit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 112px;
  height: 42px;
  min-height: 42px;
  margin: 0;
  padding: 0 17px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: #ff8a00;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .15s ease;
}
#catalogSearch .catalog-search-submit:hover {
  color: #fff;
  background: #ed7d00;
}
#catalogSearch .catalog-search-submit .svg-icon {
  width: 16px;
  height: 16px;
  color: inherit;
}

/* Course covers: shared ratio and native WordPress responsive images. */
.v3-test-card.dth-course-card {
  padding: 0;
  gap: 0;
  overflow: hidden;
  min-width: 0;
}
.dth-course-card-cover {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f3eee6;
  border-bottom: 1px solid #e5eaf2;
}
.dth-course-card-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dth-course-card-cover:focus-visible {
  outline: 3px solid #ff8a00;
  outline-offset: -3px;
}
.dth-course-card-body { padding: 20px 22px 8px; }
.dth-course-card-body h3 { margin-bottom: 8px; }
.dth-course-card-footer { padding: 0 22px 22px; margin-top: auto; }

/* Keep course summaries compact on the homepage and course listing. */
.dth-home-course-card h3,
.dth-course-card-body h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.dth-home-course-card p,
.dth-course-card-body p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
}

@media (max-width: 570px) {
  #catalogSearch {
    gap: 8px;
    padding-left: 12px;
  }
  #catalogSearch .catalog-search-submit {
    min-width: 100px;
    padding: 0 12px;
    gap: 6px;
    font-size: 12px;
  }
}

/* Primary navigation: six groups with disclosure submenus. */
.site-header .nav-wrap { overflow: visible; }
#mainNav { overflow: visible; position: relative; }
#mainNav > .primary-nav {
  display: flex;
  align-items: stretch;
  gap: 26px;
  width: 100%;
  height: 100%;
}
#mainNav .primary-nav-item { position: relative; }
#mainNav .primary-nav-row { display: flex; align-items: stretch; height: 100%; position: relative; }
#mainNav .primary-nav-link { font-size: 13px; padding: 0; width: auto; height: 48px; }
#mainNav .primary-nav-row.active::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: #ff8a00; border-radius: 2px 2px 0 0;
}
#mainNav .primary-nav-row.active .primary-nav-link { color: #0b2d6b; }
#mainNav .primary-nav-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 32px; padding: 0; margin: 0 -8px 0 0;
  color: #687791; border: 0; border-radius: 6px; background: transparent;
}
#mainNav .primary-nav-toggle:hover,
#mainNav .primary-nav-toggle[aria-expanded="true"] { color: #0b2d6b; background: #f0f5ff; }
#mainNav .primary-nav-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
#mainNav .primary-submenu {
  display: flex; flex-direction: column; align-items: stretch; gap: 3px;
  position: absolute; top: calc(100% + 6px); left: -12px; z-index: 60;
  width: max-content; min-width: 240px; max-width: calc(100vw - 32px);
  margin: 0; padding: 8px; list-style: none; background: #fff;
  border: 1px solid #dce5f2; border-radius: 12px;
  box-shadow: 0 14px 36px rgba(11,45,107,.13);
}
#mainNav .primary-submenu[hidden] { display: none; }
#mainNav .primary-submenu a {
  width: 100%; height: auto; min-height: 42px; padding: 10px 12px;
  font-size: 13px; line-height: 1.5; border-radius: 7px; white-space: normal;
}
#mainNav .primary-submenu a:hover,
#mainNav .primary-submenu a[aria-current="page"] { background: #f0f5ff; color: #0b2d6b; }
@media (max-width: 920px) {
  .site-header .nav-wrap { max-height: calc(100dvh - 110px); overflow-y: auto; overscroll-behavior: contain; }
  #mainNav { display: block; padding-top: 8px; padding-bottom: 12px; }
  #mainNav > .primary-nav { display: flex; flex-direction: column; height: auto; gap: 0; }
  #mainNav .primary-nav-row { min-height: 46px; }
  #mainNav .primary-nav-link { flex: 1; height: 46px; padding: 0 12px; }
  #mainNav .primary-nav-toggle { width: 46px; margin: 0; }
  #mainNav .primary-nav-row.active { background: #f0f5ff; border-radius: 8px; }
  #mainNav .primary-nav-row.active::after { top: 11px; bottom: 11px; width: 3px; height: auto; right: auto; }
  #mainNav .primary-submenu {
    position: static; width: auto; min-width: 0; max-width: none;
    margin: 2px 0 8px 14px; padding: 4px 6px;
    border: 0; border-left: 2px solid #e5edf8; border-radius: 0; box-shadow: none;
  }
  #mainNav .primary-submenu a { min-height: 44px; }
}

/* Full tool directory, grouped into a wide desktop disclosure panel. */
#mainNav .primary-nav-item--tools { position: static; }
#mainNav .tools-mega {
  display: block;
  left: 0; right: 0; width: auto; min-width: 0; max-width: none;
  padding: 0; border-radius: 16px;
  max-height: calc(100dvh - 220px); overflow-y: auto;
  overscroll-behavior: contain;
}
#mainNav .tools-mega[hidden] { display: none; }
.tools-mega-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 20px 24px; background: #f7faff;
  border-bottom: 1px solid #e5edf7;
}
.tools-mega-head strong { font-size: 17px; color: #0b2d6b; }
.tools-mega-head > div { flex: 1; min-width: 0; }
.tools-mega-head p { margin: 3px 0 0; font-size: 12px; color: #71829d; }
.tools-mega-count {
  flex: none; padding: 5px 11px; border-radius: 20px; white-space: nowrap;
  background: #fff0dc; color: #b85f00; font-size: 12px; font-weight: 700;
}
#mainNav .tools-mega-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px; padding: 22px 24px 18px;
}
.tools-mega-group { min-width: 0; }
.tools-mega-group h2 {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px; min-height: 44px; margin: 0 0 10px; padding-bottom: 10px;
  font-size: 13px; line-height: 1.5; color: #0b2d6b;
  border-bottom: 2px solid #e8eef8;
}
.tools-mega-group h2 span {
  flex: none; padding: 1px 6px; border-radius: 5px;
  font-size: 11px; color: #7a8ba5; background: #f1f5fb;
}
#mainNav .tools-mega-group ul {
  display: flex; flex-direction: column; align-items: stretch; gap: 2px;
}
#mainNav .tools-mega-group a {
  min-height: 36px; padding: 7px 9px; font-size: 12.5px; font-weight: 500;
  line-height: 1.5; color: #425573; overflow-wrap: anywhere;
}
#mainNav .tools-mega-group a:hover,
#mainNav .tools-mega-group a[aria-current="page"] { color: #0b2d6b; background: #eef4ff; }
.tools-mega-foot { border-top: 1px solid #e5edf7; padding: 10px 24px; }
#mainNav .tools-mega-foot a {
  display: inline-flex; width: auto; min-height: 36px;
  gap: 8px; padding: 6px 0; color: #c56a00; font-weight: 700;
}
.tools-mega-foot .svg-icon { width: 16px; height: 16px; }
@media (max-width: 920px) {
  #mainNav .tools-mega {
    position: static; max-height: none; overflow: visible;
    margin: 2px 0 8px; border: 1px solid #e5edf7; border-radius: 12px;
  }
  .tools-mega-head { padding: 14px; }
  .tools-mega-head strong { font-size: 15px; }
  #mainNav .tools-mega-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 16px 14px; }
  #mainNav .tools-mega-group a { min-height: 44px; }
  .tools-mega-foot { padding: 8px 14px; }
}
@media (max-width: 600px) {
  #mainNav .tools-mega-grid { grid-template-columns: 1fr; gap: 22px; }
  .tools-mega-group h2 { min-height: 0; margin-bottom: 6px; }
  .tools-mega-head { align-items: flex-start; }
  .tools-mega-head p { font-size: 11px; }
}

/* Floating Back-to-Top Button */
.dth-back-to-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 95;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .9);
  background: linear-gradient(135deg, #0b2d6b, #1d4ed8);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(11, 45, 107, .28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.92);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease, background .18s ease;
}
.dth-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.dth-back-to-top:hover {
  background: linear-gradient(135deg, #ea580c, #ff8a00);
  transform: translateY(-2px) scale(1.04);
}
.dth-back-to-top:focus-visible {
  outline: 3px solid #ff8a00;
  outline-offset: 2px;
}
@media (max-width: 600px) {
  .dth-back-to-top {
    right: 14px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }
}
@media print {
  .dth-back-to-top { display: none !important; }
  .is-drm-protected { display: none !important; }
}

/* Course DRM Protection (Anti-copy, Tiled Watermark, Focus Blur) */
.dth-lesson-stage {
  position: relative;
  overflow: hidden;
}
.dth-lesson-content {
  background: #f8faff;
  border: 1px solid #dbe6f5;
  border-radius: 12px;
  padding: 16px;
  white-space: pre-wrap;
  line-height: 1.75;
  color: #1e293b;
}
.dth-lesson-content.is-html {
  white-space: normal;
  padding: 20px 22px;
}
.dth-lesson-content.is-html > :first-child {
  margin-top: 0;
}
.dth-lesson-content.is-html > :last-child {
  margin-bottom: 0;
}
.dth-lesson-content.is-html h3,
.dth-lesson-content.is-html h4 {
  color: #0b2d6b;
  font-size: 16.5px;
  font-weight: 800;
  margin: 18px 0 8px;
}
.dth-lesson-content.is-html p {
  margin: 8px 0 12px;
}
.dth-lesson-content.is-html ul,
.dth-lesson-content.is-html ol {
  margin: 8px 0 14px;
  padding-left: 22px;
}
.dth-lesson-content.is-html li {
  margin: 5px 0;
}
.dth-lesson-content.is-html code {
  background: #e2e8f0;
  color: #0f172a;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.9em;
  font-family: Consolas, Monaco, monospace;
}
.dth-lesson-content.is-html pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 12px 14px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 10px 0 14px;
}
.dth-lesson-content.is-html pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}
.dth-lesson-content.is-html figure {
  margin: 12px 0;
  text-align: center;
}
.dth-lesson-content.is-html img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid #dbe6f5;
  background: #ffffff;
}
.dth-lesson-content.is-html figcaption {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
  font-style: italic;
}

/* ==========================================================================
   LMS Course Detail: Scientific Syllabus & 3D Flipbook Reader
   ========================================================================== */
.dth-course-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #dbe6f5;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(11, 45, 107, 0.04);
}
.dth-course-topbar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.dth-enrolled-pill {
  background: #dcfce7;
  color: #15803d;
  font-weight: 800;
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 999px;
}
.dth-progress-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8faff;
  border: 1px solid #dbe6f5;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  color: #334155;
}
.dth-progress-track {
  width: 86px;
  height: 7px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.dth-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0b2d6b, #ea580c);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.dth-readmode-switch {
  display: inline-flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid #dbe6f5;
  gap: 4px;
}
.dth-mode-btn {
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.dth-mode-btn.is-active {
  background: #0b2d6b;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(11, 45, 107, 0.22);
}

.dth-lms-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.dth-syllabus-side {
  position: sticky;
  top: 86px;
  background: #ffffff;
  border: 1px solid #dbe6f5;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(11, 45, 107, 0.05);
}
.dth-syllabus-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(135deg, #0b2d6b 0%, #17469e 100%);
  color: #ffffff;
}
.dth-syllabus-head strong {
  display: block;
  font-size: 15px;
}
.dth-syllabus-head small {
  font-size: 12px;
  opacity: 0.85;
}
.dth-syl-count {
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.dth-syllabus-search-wrap {
  padding: 10px 12px 6px;
  background: #f8faff;
  border-bottom: 1px solid #e2e8f0;
}
.dth-syllabus-search {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  background: #ffffff;
}
.dth-syllabus-search:focus {
  border-color: #0b2d6b;
}
.dth-syllabus-list {
  max-height: calc(100vh - 240px);
  overflow-y: auto;
  padding: 8px;
  display: grid;
  gap: 6px;
}
.dth-syllabus-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.18s ease;
}
.dth-syllabus-item:hover {
  background: #f8faff;
  border-color: #dbe6f5;
}
.dth-syllabus-item.is-active {
  background: #eff6ff;
  border-color: #93c5fd;
  box-shadow: inset 3px 0 0 #ea580c;
}
.dth-syl-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.dth-syllabus-item.is-active .dth-syl-num {
  background: #ea580c;
  color: #ffffff;
}
.dth-syl-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.dth-syl-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dth-syllabus-item.is-active .dth-syl-title {
  color: #0b2d6b;
}
.dth-syl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.dth-syl-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}
.dth-syl-badge.is-preview { background: #dcfce7; color: #15803d; }
.dth-syl-badge.is-locked { background: #ffedd5; color: #c2410c; }
.dth-syl-badge.is-reading { background: #dbeafe; color: #1d4ed8; }
.dth-syl-badge.is-open { background: #f1f5f9; color: #475569; }
.dth-syl-exam {
  font-size: 11px;
  font-weight: 700;
  color: #0b2d6b;
}
.dth-syl-empty {
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
}
.dth-syl-section-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 800;
  color: #0b2d6b;
  background: #f1f5f9;
  border: 0;
  border-left: 3px solid #0b2d6b;
  padding: 8px 10px;
  border-radius: 6px;
  margin: 6px 0 2px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease;
}
.dth-syl-section-head:hover {
  background: #e2e8f0;
}
.dth-syl-section-head:first-child {
  margin-top: 0;
}
.dth-syl-sec-label {
  flex: 1;
  min-width: 0;
}
.dth-syl-sec-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  color: #475569;
  font-size: 11px;
  text-transform: none;
}
.dth-syl-caret {
  font-size: 13px;
  line-height: 1;
}

.dth-lesson-head-card {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}
.dth-author-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: #475569;
}
.dth-author-inline strong {
  color: #0b2d6b;
  margin-right: 8px;
}
.dth-author-inline-ava {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #0b2d6b;
}

/* Flipbook Shell */
.dth-book-shell {
  perspective: 1800px;
}
.dth-book-spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
  background: #e9eef7;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 18px 38px rgba(11, 45, 107, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  transform-style: preserve-3d;
}
.dth-book-shell.is-single .dth-book-spread {
  grid-template-columns: minmax(0, 1fr);
}
.dth-book-spread.is-flipping-next {
  animation: dthFlipNext 0.4s ease-out;
}
.dth-book-spread.is-flipping-prev {
  animation: dthFlipPrev 0.4s ease-out;
}
@keyframes dthFlipNext {
  0% { transform: rotateY(-8deg) scale(0.99); opacity: 0.75; }
  100% { transform: rotateY(0deg) scale(1); opacity: 1; }
}
@keyframes dthFlipPrev {
  0% { transform: rotateY(8deg) scale(0.99); opacity: 0.75; }
  100% { transform: rotateY(0deg) scale(1); opacity: 1; }
}
.dth-book-page {
  background: linear-gradient(180deg, #fffef9 0%, #fcfaf2 100%);
  border: 1px solid #e5dec9;
  border-radius: 8px;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 20px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}
.dth-book-page.is-left {
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
  box-shadow: inset -12px 0 20px -14px rgba(11, 45, 107, 0.18);
}
.dth-book-page.is-right {
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
  box-shadow: inset 12px 0 20px -14px rgba(11, 45, 107, 0.18);
}
.dth-book-spine {
  background: linear-gradient(90deg, rgba(11, 45, 107, 0.18), rgba(255, 255, 255, 0.7) 50%, rgba(11, 45, 107, 0.18));
  border-radius: 2px;
}
.dth-book-page-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px dashed #dfd7c0;
}
.dth-book-page-head span:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dth-book-page-body {
  flex: 1;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: 14.5px;
}
.dth-book-page-foot {
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px dashed #dfd7c0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}
.dth-book-endcard {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 24px 12px;
}
.dth-book-endcard-icon {
  font-size: 42px;
}
.dth-book-endcard h4 {
  margin: 0;
  font-size: 18px;
  color: #0b2d6b;
}
.dth-book-endcard p {
  margin: 0 0 6px;
  color: #475569;
  font-size: 13.5px;
}
.dth-book-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  background: #f8faff;
  border: 1px solid #dbe6f5;
  border-radius: 12px;
}
.dth-book-pager {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.dth-book-pager-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #0b2d6b;
}
.dth-book-dots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.dth-book-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
}
.dth-book-dot.is-active {
  width: 24px;
  background: #ea580c;
}
.dth-book-hint {
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  color: #64748b;
}
@media (max-width: 1080px) {
  .dth-lms-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}
@media (max-width: 919px) {
  .dth-lms-layout {
    grid-template-columns: 1fr;
  }
  .dth-syllabus-side {
    position: static;
  }
  .dth-syllabus-list {
    max-height: 280px;
  }
  .dth-book-page {
    min-height: 360px;
    padding: 14px 16px;
  }
}

/* Fullscreen Zen Book Popup + Real 3D Page-Flip Leaf */
.dth-mode-zoom {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}
.dth-mode-zoom:hover {
  background: #ea580c;
  color: #ffffff;
  border-color: #ea580c;
}
.dth-btn-zoom {
  border-color: #fdba74 !important;
  color: #c2410c !important;
  background: #fff7ed !important;
}
.dth-btn-zoom:hover {
  background: #ea580c !important;
  color: #ffffff !important;
  border-color: #ea580c !important;
}
.dth-book-cover-frame {
  position: relative;
}
.dth-book-edge-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 8;
  width: 38px;
  height: 64px;
  border: 1px solid rgba(11, 45, 107, 0.16);
  background: rgba(255, 255, 255, 0.92);
  color: #0b2d6b;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(11, 45, 107, 0.14);
  transition: all 0.18s ease;
  display: grid;
  place-items: center;
}
.dth-book-edge-btn:hover {
  background: #0b2d6b;
  color: #ffffff;
  transform: translateY(-50%) scale(1.06);
}
.dth-book-edge-btn.is-prev { left: -14px; }
.dth-book-edge-btn.is-next { right: -14px; }

.dth-book-spread {
  position: relative;
}
.dth-flip-leaf {
  position: absolute;
  top: 12px;
  bottom: 12px;
  width: calc(50% - 21px);
  pointer-events: none;
  z-index: 7;
  background: linear-gradient(90deg, #f3ebd3 0%, #fffef8 28%, #fcfaf0 100%);
  border: 1px solid #dfd7c0;
  border-radius: 8px;
  backface-visibility: hidden;
  box-shadow: 0 12px 30px rgba(11, 45, 107, 0.25);
}
.dth-flip-leaf.is-next {
  right: 12px;
  transform-origin: left center;
  animation: dthLeafTurnNext 0.38s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.dth-flip-leaf.is-prev {
  left: 12px;
  transform-origin: right center;
  animation: dthLeafTurnPrev 0.38s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
@keyframes dthLeafTurnNext {
  0% { transform: rotateY(0deg); opacity: 0.65; }
  45% { box-shadow: -14px 6px 26px rgba(11, 45, 107, 0.22); opacity: 0.45; }
  100% { transform: rotateY(-168deg); opacity: 0; }
}
@keyframes dthLeafTurnPrev {
  0% { transform: rotateY(0deg); opacity: 0.65; }
  45% { box-shadow: 14px 6px 26px rgba(11, 45, 107, 0.22); opacity: 0.45; }
  100% { transform: rotateY(168deg); opacity: 0; }
}

.dth-book-zen-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at top, #132952 0%, #091326 100%);
  display: flex;
  flex-direction: column;
  padding: 14px 22px 18px;
  overflow: hidden;
  animation: dthZenFadeIn 0.22s ease-out;
}
@keyframes dthZenFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.dth-book-zen-bar {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #ffffff;
  z-index: 10;
}
.dth-book-zen-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.dth-zen-badge {
  background: rgba(234, 88, 12, 0.92);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.dth-book-zen-title strong {
  font-size: 15.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dth-book-zen-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.dth-zen-tool-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f8fafc;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 8px;
  cursor: pointer;
}
.dth-zen-tool-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.24);
}
.dth-zen-tool-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.dth-zen-lesson-num {
  font-size: 12.5px;
  font-weight: 700;
  color: #cbd5e1;
  padding: 0 4px;
}
.dth-zen-sep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.22);
  margin: 0 4px;
}
.dth-zen-close-btn {
  background: #ea580c;
  border: 0;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.dth-zen-close-btn:hover {
  background: #c2410c;
}
.dth-book-zen-body {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.dth-book-shell.is-zen-book {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.dth-book-shell.is-zen-book .dth-book-cover-frame {
  flex: 1;
  min-height: 0;
  display: flex;
}
.dth-book-shell.is-zen-book .dth-book-spread {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e3a6e 0%, #0f254f 100%);
  padding: 14px 16px;
  border: 2px solid #35589a;
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.5);
}
.dth-book-shell.is-zen-book .dth-book-page {
  min-height: 0;
  height: 100%;
  padding: 24px 32px;
  overflow-y: auto;
}
.dth-book-shell.is-zen-book .dth-book-page-body {
  font-size: 15.5px;
}
.dth-book-shell.is-zen-book .dth-book-controls {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.96);
}
.dth-book-shell.is-zen-book .dth-book-hint {
  color: #cbd5e1;
}
@media (max-width: 919px) {
  .dth-book-zen-overlay {
    padding: 10px;
  }
  .dth-book-edge-btn.is-prev { left: 4px; }
  .dth-book-edge-btn.is-next { right: 4px; }
  .dth-book-shell.is-zen-book .dth-book-page {
    padding: 16px 18px;
  }
}
@media (max-width: 640px) {
  .dth-course-topbar {
    padding: 10px;
  }
  .dth-readmode-switch {
    width: 100%;
    justify-content: space-between;
  }
  .dth-mode-btn {
    flex: 1;
    padding: 6px 6px;
    font-size: 11.5px;
    text-align: center;
  }
  .dth-book-edge-btn {
    display: none;
  }
  .dth-book-page {
    min-width: 0;
    overflow-x: hidden;
    padding: 12px 14px;
  }
  .dth-book-page-body pre {
    max-width: 100%;
    font-size: 12px;
  }
  .dth-book-controls {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .dth-book-nav-left .v3-btn,
  .dth-book-nav-right .v3-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Homepage Courses Horizontal Slider */
.dth-course-slider-wrap {
  position: relative;
}
.dth-course-slider-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 48px) / 4);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px 2px 10px;
}
.dth-course-slider-track::-webkit-scrollbar {
  display: none;
}
.dth-course-slider-track .dth-home-course-card {
  scroll-snap-align: start;
}
.dth-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: rgba(255, 255, 255, 0.96);
  color: #0b2d6b;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(11, 45, 107, 0.16);
  transition: all 0.18s ease;
}
.dth-slider-btn:hover:not(:disabled) {
  background: #0b2d6b;
  color: #ffffff;
  border-color: #0b2d6b;
}
.dth-slider-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.dth-slider-btn.is-prev { left: -18px; }
.dth-slider-btn.is-next { right: -18px; }
@media (max-width: 1120px) {
  .dth-course-slider-track { grid-auto-columns: calc((100% - 32px) / 3); }
  .dth-slider-btn.is-prev { left: -8px; }
  .dth-slider-btn.is-next { right: -8px; }
}
@media (max-width: 820px) {
  .dth-course-slider-track { grid-auto-columns: calc((100% - 16px) / 2); }
}
@media (max-width: 540px) {
  .dth-course-slider-track { grid-auto-columns: 86%; }
  .dth-slider-btn { width: 34px; height: 34px; font-size: 20px; }
}
.is-drm-protected,
.is-drm-protected * {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.dth-drm-watermark {
  position: absolute;
  inset: -40px;
  pointer-events: none;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 56px 24px;
  align-content: space-around;
  justify-items: center;
  transform: rotate(-20deg);
  opacity: .095;
  color: #0b2d6b;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  line-height: 1.35;
}
.is-drm-blurred > :not(.dth-drm-blur-notice) {
  filter: blur(14px);
  pointer-events: none;
}
.dth-drm-blur-notice {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(11, 45, 107, .14);
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.dth-drm-blur-notice[hidden] {
  display: none;
}
.dth-drm-blur-notice > div {
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  padding: 20px 24px;
  text-align: center;
  max-width: 380px;
  color: #0b2d6b;
  box-shadow: 0 14px 36px rgba(11, 45, 107, .18);
}
.dth-drm-blur-notice p {
  margin: 8px 0 0;
  font-size: 13.5px;
  color: #475569;
}

/* Running Marquee on Top Announcement Bar */
.announcement .announce-inner {
  gap: 12px;
}
.dth-announce-marquee {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
}
.dth-announce-track {
  display: inline-flex;
  align-items: center;
  gap: 64px;
  white-space: nowrap;
  width: max-content;
  animation: dth-announce-scroll 24s linear infinite;
}
.dth-announce-marquee:hover .dth-announce-track {
  animation-play-state: paused;
}
.dth-announce-track span {
  font-weight: 600;
}
@keyframes dth-announce-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .dth-announce-track { animation: none; }
}
