/* ==========================================================================
   CB NORDIC AURORA REDESIGN THEME — cb-theme-nordic-aurora.css
   ========================================================================== */

:root {
  /* Nordic Light Theme Palette (Default) */
  --bg: #f3f7fa;
  --fg: #1c2534;
  --fg-muted: #4e5d78;
  --fg-subtle: #8a99b5;
  
  /* Frosted Glass Custom Variables (Apple Light Glass) */
  --glass-bg: rgba(255, 255, 255, 0.22);
  --glass-bg-hover: rgba(255, 255, 255, 0.38);
  --glass-bg-active: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.40);
  --glass-border-hi: rgba(255, 255, 255, 0.65);
  /* v975 liquid-glass speculars: crisp top catch-line + a wide soft pool of
   * light falling into the upper face of the pane (negative-spread inset so
   * it hugs the top edge), then the hairline lowlight at the foot. */
  --glass-shadow: 0 12px 40px rgba(31, 41, 55, 0.06), inset 0 1.5px 0 0 rgba(255, 255, 255, 0.55), inset 0 12px 24px -16px rgba(255, 255, 255, 0.5), inset 0 -0.5px 0 0 rgba(0, 0, 0, 0.04);
  --glass-shadow-hover: 0 20px 48px rgba(31, 41, 55, 0.09), inset 0 1.5px 0 0 rgba(255, 255, 255, 0.75), inset 0 16px 32px -18px rgba(255, 255, 255, 0.6), inset 0 -0.5px 0 0 rgba(0, 0, 0, 0.05);
  --glass-blur: blur(40px) saturate(190%) contrast(90%);
  
  /* Aurora Accents */
  --mint: #4adbb5;
  --mint-glow: rgba(74, 219, 181, 0.25);
  --blue: #5ba4ff;
  --blue-glow: rgba(91, 164, 255, 0.25);
  --lavender: #ad93ff;
  --lavender-glow: rgba(173, 147, 255, 0.25);
  --gold: #f4ab43;
  --gold-glow: rgba(244, 171, 67, 0.25);
  
  /* Gradients */
  --aurora-gradient: linear-gradient(135deg, var(--mint) 0%, var(--blue) 50%, var(--lavender) 100%);
  --metallic-gradient: linear-gradient(135deg, var(--fg) 30%, var(--fg-muted) 100%);
  
  /* Easing and Transition */
  --ease-cubic: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 0.25s;
  --t-medium: 0.45s;
}

/* Dark Glass Override Mode (Apple Dark / visionOS-like Glass) */
[data-theme="dark"] {
  --bg: #050711;
  --fg: #f3f7fa;
  --fg-muted: #b0c2de;
  --fg-subtle: #6c7d93;
  
  --glass-bg: rgba(10, 15, 30, 0.38);
  --glass-bg-hover: rgba(15, 22, 45, 0.50);
  --glass-bg-active: rgba(20, 30, 60, 0.62);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-hi: rgba(255, 255, 255, 0.22);
  /* v975 liquid-glass speculars (dark): same layering, quieter values —
   * the pane reads by its edge light, not by surface brightness. */
  --glass-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1.5px 0 0 rgba(255, 255, 255, 0.14), inset 0 14px 28px -18px rgba(255, 255, 255, 0.07), inset 0 -0.5px 0 0 rgba(0, 0, 0, 0.30);
  --glass-shadow-hover: 0 32px 72px rgba(0, 0, 0, 0.55), inset 0 1.5px 0 0 rgba(255, 255, 255, 0.20), inset 0 18px 36px -20px rgba(255, 255, 255, 0.10), inset 0 -0.5px 0 0 rgba(0, 0, 0, 0.35);
  --glass-blur: blur(40px) saturate(160%) contrast(95%);
  
  --accent: #5ba4ff !important;
  --accent2: #ad93ff !important;
  --ar: 91,164,255 !important;
  --metallic-gradient: linear-gradient(135deg, var(--fg) 20%, #a1a1aa 100%);
}

/* ==========================================================================
   BACKGROUND & MESH OVERRIDES
   ========================================================================== */
body {
  background: var(--bg) !important;
  transition: background var(--t-medium) var(--ease-cubic);
  isolation: isolate;
}

.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: 
    radial-gradient(ellipse 60% 40% at 10% 20%, rgba(74, 219, 181, 0.24) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 90% 10%, rgba(173, 147, 255, 0.22) 0%, transparent 65%),
    radial-gradient(ellipse 70% 60% at 40% 80%, rgba(91, 164, 255, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 90%, rgba(244, 171, 67, 0.1) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg) 100%);
  animation: aurora-drift-anim 35s ease-in-out infinite alternate;
}

[data-theme="dark"] .aurora-bg {
  background: 
    radial-gradient(ellipse 70% 50% at 15% 15%, rgba(74, 219, 181, 0.35) 0%, transparent 70%),
    radial-gradient(ellipse 60% 60% at 85% 15%, rgba(173, 147, 255, 0.32) 0%, transparent 70%),
    radial-gradient(ellipse 80% 70% at 35% 85%, rgba(91, 164, 255, 0.28) 0%, transparent 80%),
    radial-gradient(ellipse 50% 50% at 75% 85%, rgba(244, 171, 67, 0.15) 0%, transparent 70%),
    linear-gradient(180deg, #070913 0%, #0c1020 100%);
}

@keyframes aurora-drift-anim {
  0% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.05) translate(1%, -2%); }
  100% { transform: scale(1) translate(-1%, 1%); }
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Disable old mesh background if present */
.cb-mesh-bg {
  display: none !important;
}

/* ==========================================================================
   MODULE WINDOW / TAB-LAYOUT OVERRIDES
   ========================================================================== */
body.cbd-nordic-theme .tab-layout {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 24px !important;
  box-shadow: var(--glass-shadow) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  margin-top: 30px !important;
  margin-bottom: 50px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  transition: all var(--t-medium) var(--ease-cubic) !important;
}

body.cbd-nordic-theme .tab-layout:hover {
  border-color: var(--glass-border-hi) !important;
  box-shadow: var(--glass-shadow-hover) !important;
}

/* Override the vertical split line divider */
body.cbd-nordic-theme .tab-layout::before {
  display: none !important;
  content: none !important;
}

/* ==========================================================================
   HORIZONTAL TAB-BAR OVERRIDES
   ========================================================================== */
body.cbd-nordic-theme .tab-layout .chip-nav {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  overflow-x: auto !important;
  scrollbar-width: none !important; /* Firefox */
  border-right: none !important;
  border-bottom: 1px solid var(--glass-border) !important;
  background: rgba(255, 255, 255, 0.15) !important;
  padding: 10px 24px 0 !important;
  gap: 4px !important;
  position: static !important;
  top: auto !important;
}

/* Make sure the tab-panel takes full width in the column layout */
body.cbd-nordic-theme .tab-layout > .tab-panel {
  width: 100% !important;
  flex: 1 !important;
  min-width: 0 !important;
}

/* Hide scrollbar for Chrome/Safari */
body.cbd-nordic-theme .tab-layout .chip-nav::-webkit-scrollbar {
  display: none !important;
}

/* Tab button override */
body.cbd-nordic-theme .tab-layout .chip-nav button {
  margin-bottom: 0 !important;
  padding: 14px 20px !important;
  padding-left: 20px !important; /* Override vertical indent */
  border: none !important;
  border-radius: 0 !important;
  font-family: var(--font-display), 'Manrope', sans-serif !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  color: var(--fg-muted) !important;
  background: transparent !important;
  position: relative !important;
  white-space: nowrap !important;
  outline: none !important;
  transform: none !important;
  transition: color var(--t-fast) var(--ease-cubic) !important;
}

/* Remove old vertical list indicator dot */
body.cbd-nordic-theme .tab-layout .chip-nav button::before {
  display: none !important;
  content: none !important;
}

body.cbd-nordic-theme .tab-layout .chip-nav button:hover {
  color: var(--fg) !important;
  background: transparent !important;
  transform: none !important;
}

body.cbd-nordic-theme .tab-layout .chip-nav button.active {
  color: var(--blue) !important;
  background: transparent !important;
  font-weight: 700 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Slide underline on active tab */
body.cbd-nordic-theme .tab-layout .chip-nav button.active::after {
  content: '' !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 12px !important;
  right: 12px !important;
  height: 3px !important;
  background: var(--blue) !important;
  border-radius: 3px 3px 0 0 !important;
  box-shadow: 0 -2px 10px rgba(91, 164, 255, 0.6) !important;
  animation: tab-underline-slide 0.3s var(--ease-cubic) !important;
}

@keyframes tab-underline-slide {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Hide Pacing bar from module shell if we are using horizontal tabs to avoid layout clutter */
.cb-ms-bar {
  display: none !important;
}

/* ==========================================================================
   DYNAMIC SPLIT WORKSPACE
   ========================================================================== */
.module-workspace {
  display: flex;
  flex: 1;
  min-height: 520px;
  overflow: hidden;
}

/* Left index rail (Table of Contents) */
.module-rail {
  width: 230px;
  border-right: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.1);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
  overflow-y: auto;
}

[data-theme="dark"] .module-rail {
  background: rgba(0, 0, 0, 0.15);
}

.rail-header {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  font-weight: 700;
  padding-left: 8px;
  margin-bottom: 6px;
}

.rail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: var(--fg-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all var(--t-fast) var(--ease-cubic);
  outline: none;
}

.rail-item-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: var(--fg);
}

[data-theme="dark"] .rail-item-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.rail-item-btn.active {
  background: rgba(255, 255, 255, 0.65);
  color: var(--fg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 8px rgba(31, 41, 55, 0.04);
}

[data-theme="dark"] .rail-item-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--fg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.rail-item-index {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: var(--fg-subtle);
  margin-right: 10px;
  font-weight: 500;
}

.rail-item-btn.active .rail-item-index {
  color: var(--blue);
  font-weight: 700;
}

/* Right Viewer Panel (Scrollable content pane) */
.module-viewer {
  flex: 1;
  overflow-y: auto;
  scroll-behavior: smooth;
  position: relative;
}

.module-viewer .container {
  padding: 30px 40px !important;
  max-width: none !important;
}

/* ==========================================================================
   GLASS CARDS & BL-STRIPS REDESIGN
   ========================================================================== */
.bl-strip {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  border-left: 4px solid var(--border2) !important;
  border-radius: 16px !important;
  box-shadow: var(--glass-shadow) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  transition: all var(--t-fast) var(--ease-cubic) !important;
  overflow: visible !important;
}

[data-theme="dark"] .bl-strip {
  background: var(--glass-bg) !important;
  border-color: var(--glass-border) !important;
  border-left-width: 4px !important;
}

.bl-strip:hover {
  border-color: var(--glass-border-hi) !important;
  background: var(--glass-bg-hover) !important;
  box-shadow: var(--glass-shadow-hover), 0 10px 30px rgba(91, 164, 255, 0.08) !important;
  transform: translateY(-3px) scale(1.01) !important;
}

/* Accordions and Reveal cards */
.ma-item, .rc2, .self-check {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: var(--glass-shadow) !important;
  border-radius: 16px !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  transition: all var(--t-fast) var(--ease-cubic) !important;
}

.ma-item:hover, .rc2:hover, .self-check:hover {
  border-color: var(--glass-border-hi) !important;
  background: var(--glass-bg-hover) !important;
  box-shadow: var(--glass-shadow-hover), 0 10px 30px rgba(91, 164, 255, 0.08) !important;
  transform: translateY(-2px) scale(1.005) !important;
}

/* Hide background overlay filters that clash with aurora */
body::before {
  display: none !important;
}

/* ==========================================================================
   RESPONSIVENESS & MOBILE COLLAPSE
   ========================================================================== */
@media (max-width: 768px) {
  .module-workspace {
    flex-direction: column !important;
  }
  
  .module-rail {
    display: none !important; /* Hide left rail on mobile and scroll full width */
  }
  
  .module-viewer .container {
    padding: 20px !important;
  }
  
  .tab-layout .chip-nav {
    padding: 10px 16px 0 !important;
  }
}

/* ==========================================================================
   DASHBOARD REDESIGN STYLES (SIDEBAR, GAUGES, QUIZ MODAL)
   ========================================================================== */

/* 1. Desktop Sidebar Appdock */
.sidebar {
  width: 260px;
  min-height: 100vh;
  border-right: 1px solid var(--glass-border) !important;
  background: var(--glass-bg) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 1000;
  box-shadow: var(--glass-shadow) !important;
  transition: width var(--t-fast) var(--ease-cubic), padding var(--t-fast) var(--ease-cubic), transform var(--t-medium) var(--ease-cubic);
}

[data-theme="dark"] .sidebar {
  background: var(--glass-bg) !important;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 10px;
  text-decoration: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--aurora-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 4px 14px var(--blue-glow);
}

.brand-name {
  font-family: var(--font-display), 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: var(--fg);
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: var(--metallic-gradient) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

.brand-sub {
  font-size: 9.5px;
  font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue);
  font-weight: 600;
  display: block;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--fg-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--t-fast) var(--ease-cubic);
}

.nav-item-link:hover {
  color: var(--fg) !important;
  background: var(--glass-bg-hover) !important;
  transform: translateX(4px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .nav-item-link:hover {
  background: var(--glass-bg-hover) !important;
}

.nav-item-link.active {
  color: var(--blue) !important;
  background: rgba(91, 164, 255, 0.12) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 4px 16px rgba(91, 164, 255, 0.18) !important;
  font-weight: 700 !important;
}

.nav-item-icon {
  font-size: 16px;
}

.nav-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 10px 0;
}

/* 2. Main Viewport & Header */
.main-viewport {
  flex: 1;
  min-width: 0;
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 1600px;
  margin: 0 auto;
  margin-left: 260px; /* Leave space for sidebar */
  z-index: 1;
  transition: margin-left var(--t-fast) var(--ease-cubic);
}

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.search-container {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-filter-ambient);
  -webkit-backdrop-filter: var(--glass-filter-ambient);
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: all var(--t-fast) var(--ease-cubic);
  box-shadow: var(--glass-shadow);
}

.search-input:focus {
  background: var(--glass-bg-hover);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(91, 164, 255, 0.15);
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fg-subtle);
  pointer-events: none;
  font-size: 16px;
}

.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px 8px 8px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: var(--glass-shadow);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--aurora-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  border: 1.5px solid white;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--fg);
}

.user-role {
  font-size: 10px;
  font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-subtle);
}

.dashboard-hero {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.welcome-title {
  font-family: var(--font-display), 'Manrope', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin: 0;
}

.welcome-date {
  font-size: 13px;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
}

/* 3. Overview Grid & circular progress gauges */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.progress-circle-group {
  display: flex;
  justify-content: space-around;
  gap: 12px;
  margin-top: 15px;
}

.progress-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.circle-svg {
  width: 68px;
  height: 68px;
  transform: rotate(-90deg);
}

.circle-bg {
  fill: none;
  stroke: rgba(122, 156, 220, 0.15);
  stroke-width: 6;
}

.circle-bar {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 188.4;
  transition: stroke-dashoffset 0.8s ease-in-out;
}

.circle-text {
  font-family: var(--font-display), 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--fg);
}

.circle-lbl {
  font-size: 11px;
  color: var(--fg-subtle);
  font-weight: 500;
}

/* Active course & tabs */
.course-tabs {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 4px;
}

.course-tab-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  transition: all var(--t-fast);
}

.course-tab-btn:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.2);
}

.course-tab-btn.active {
  color: var(--blue);
  background: rgba(91, 164, 255, 0.08);
}

.course-tab-content {
  display: none;
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-muted);
  margin-top: 10px;
  min-height: 50px;
}

.course-tab-content.active {
  display: block;
}

.course-video-box {
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.course-video-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--t-fast);
}

.course-video-box:hover .course-video-overlay {
  background: rgba(0, 0, 0, 0.2);
}

.course-play-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(91, 164, 255, 0.4);
  transition: transform var(--t-fast);
}

.course-video-box:hover .course-play-btn {
  transform: scale(1.1);
}

/* 4. Anatomy Quiz Popup Modal */
.quiz-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(28, 37, 52, 0.4);
  backdrop-filter: var(--glass-filter-standard);
  -webkit-backdrop-filter: var(--glass-filter-standard);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast) var(--ease-cubic);
}

.quiz-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.quiz-dialog {
  background: var(--glass-bg-hover);
  border: 1px solid var(--glass-border-hi);
  border-radius: 22px;
  width: 100%;
  max-width: 480px;
  padding: 30px;
  box-shadow: 0 24px 64px rgba(31, 41, 55, 0.2);
  transform: translateY(20px);
  transition: transform var(--t-medium) var(--ease-cubic);
  position: relative;
}

.quiz-overlay.open .quiz-dialog {
  transform: translateY(0);
}

.quiz-close {
  position: absolute;
  top: 20px;
  right: 20px;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: var(--fg-subtle);
  transition: color var(--t-fast);
  outline: none;
}

.quiz-close:hover {
  color: var(--fg);
}

.quiz-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.quiz-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue);
  font-weight: 700;
}

.quiz-question-number {
  font-size: 13px;
  color: var(--fg-subtle);
}

.quiz-question-text {
  font-family: var(--font-display), 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--fg);
  line-height: 1.4;
  margin-bottom: 20px;
}

.quiz-image-box {
  border-radius: 12px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--glass-border);
  width: 100%;
  aspect-ratio: 1.6 / 1;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.quiz-image-box svg {
  width: 60%;
  height: 60%;
}

.quiz-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.choice-btn {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--fg-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all var(--t-fast) var(--ease-cubic);
  outline: none;
}

.choice-btn:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hi);
  color: var(--fg);
  transform: translateY(-1px);
}

.choice-btn.selected {
  border-color: var(--blue);
  background: rgba(91, 164, 255, 0.08);
  color: var(--blue);
}

.choice-btn.correct {
  border-color: var(--mint);
  background: rgba(74, 219, 181, 0.08);
  color: #17876a;
  box-shadow: 0 0 16px rgba(74, 219, 181, 0.15);
}

.choice-btn.wrong {
  border-color: #ff5b79;
  background: rgba(255, 91, 121, 0.08);
  color: #bd1b37;
}

.quiz-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* 5. Buttons and Cards */
.mock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-cubic);
  outline: none;
  text-decoration: none;
}

.mock-btn-primary {
  background: var(--aurora-gradient);
  color: white;
  box-shadow: 0 4px 14px var(--blue-glow);
}

.mock-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px var(--blue-glow);
}

.mock-btn-secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--fg-muted);
}

.mock-btn-secondary:hover {
  background: var(--glass-bg-hover);
  color: var(--fg);
}

.mock-btn-ghost {
  background: transparent;
  color: var(--fg-subtle);
}

.mock-btn-ghost:hover {
  color: var(--fg);
}

/* Quick access card widgets */
.qa-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 15px;
}

.qa-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--t-fast);
}

.qa-card:hover {
  border-color: var(--glass-border-hi);
  transform: translateY(-2px);
}

.qa-card-img {
  width: 100%;
  aspect-ratio: 1.8 / 1;
  background: #e2e8f0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.qa-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--fg);
  margin: 0;
}

.qa-card-meta {
  font-size: 11px;
  color: var(--fg-subtle);
  margin: 0;
}

/* Sidebar Collapse Mode Styles */
html[data-sidebar="collapsed"] .sidebar {
  width: 80px;
  padding: 30px 14px;
}

html[data-sidebar="collapsed"] .main-viewport {
  margin-left: 80px;
}

/* Hide brand text details when collapsed */
html[data-sidebar="collapsed"] .brand {
  padding-left: 0;
  justify-content: center;
}

html[data-sidebar="collapsed"] .brand-info {
  display: none !important;
}

/* Center nav items and hide labels when collapsed */
html[data-sidebar="collapsed"] .nav-item-link {
  padding: 12px 0;
  justify-content: center;
  gap: 0;
}

html[data-sidebar="collapsed"] .nav-item-link:hover {
  transform: none; /* Disable shift to right when minimized to keep centered look clean */
}

html[data-sidebar="collapsed"] .nav-item-link span:not(.nav-item-icon) {
  display: none !important;
}

/* Minimize divider size and center it */
html[data-sidebar="collapsed"] .nav-divider {
  margin: 10px auto;
  width: 24px;
}

/* Sidebar Toggle Floating Button */
.sidebar-toggle {
  position: absolute;
  top: 34px;
  right: -12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--bg);
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1010;
  box-shadow: var(--glass-shadow);
  transition: transform var(--t-fast) var(--ease-cubic), background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}

.sidebar-toggle:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hi);
  color: var(--fg);
  box-shadow: var(--glass-shadow-hover);
  transform: scale(1.1);
}

.sidebar-toggle .toggle-icon {
  font-size: 10px;
  display: inline-block;
  line-height: 1;
  transition: transform var(--t-fast) var(--ease-cubic);
}

/* Rotate arrow when collapsed */
html[data-sidebar="collapsed"] .sidebar-toggle .toggle-icon {
  transform: rotate(180deg);
}

/* Hide toggle button on mobile since sidebar is hidden anyway */
@media (max-width: 800px) {
  .sidebar-toggle {
    display: none !important;
  }
}

/* Mobile Appdock Navigation */
.mobile-nav-bar {
  display: none;
}

@media (max-width: 800px) {
  body {
    padding-bottom: 74px !important;
  }
  
  .sidebar {
    display: none !important;
  }
  
  .main-viewport {
    margin-left: 0 !important;
    padding: 20px 16px !important;
  }
  
  .overview-grid {
    grid-template-columns: 1fr !important;
  }
  
  .qa-card-grid {
    grid-template-columns: 1fr !important;
  }
  
  .mobile-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: var(--glass-bg) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border-top: 1px solid var(--glass-border) !important;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: var(--glass-shadow) !important;
  }
  
  [data-theme="dark"] .mobile-nav-bar {
    background: var(--glass-bg) !important;
    box-shadow: var(--glass-shadow) !important;
  }
  
  .mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--fg-muted);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: color var(--t-fast);
    flex: 1;
    height: 100%;
  }
  
  .mobile-nav-link.active {
    color: var(--blue);
  }
  
  .mobile-nav-icon {
    font-size: 18px;
  }
}

body.cbd-nordic-theme.cbd-module-page .site-nav {
  display: none !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav:hover {
  background: var(--glass-bg-hover) !important;
  border-bottom-color: var(--glass-border-hi) !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav .logo-link {
  color: var(--fg) !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav .logo-link .mark {
  background: var(--aurora-gradient) !important;
  box-shadow: 0 2px 10px var(--blue-glow) !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav .logo-link:hover .mark {
  transform: scale(1.1) rotate(-4deg) !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav .brand-text {
  font-family: var(--font-display), 'Manrope', sans-serif !important;
  font-weight: 800 !important;
  color: var(--fg) !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav a.cb-nav-edu-btn {
  color: var(--fg-muted) !important;
  font-weight: 600 !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  transition: all var(--t-fast) var(--ease-cubic) !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav a.cb-nav-edu-btn:hover {
  color: var(--fg) !important;
  background: var(--glass-bg-hover) !important;
  border-color: var(--glass-border) !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav button.cb-nav-flashcards-btn {
  color: var(--fg-muted) !important;
  font-weight: 600 !important;
  border: 1px solid var(--glass-border) !important;
  background: var(--glass-bg) !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  box-shadow: var(--glass-shadow) !important;
  transition: all var(--t-fast) var(--ease-cubic) !important;
  font-family: var(--font-display), 'Manrope', sans-serif !important;
  font-size: 12.5px !important;
  cursor: pointer !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav button.cb-nav-flashcards-btn:hover {
  color: var(--fg) !important;
  background: var(--glass-bg-hover) !important;
  border-color: var(--glass-border-hi) !important;
  box-shadow: var(--glass-shadow-hover) !important;
  transform: translateY(-1px) !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav a.cb-nav-npte-btn,
body.cbd-nordic-theme.cbd-module-page .site-nav a.cb-nav-biz-btn {
  border: 1px solid var(--glass-border) !important;
  background: var(--glass-bg) !important;
  color: var(--fg-muted) !important;
  box-shadow: var(--glass-shadow) !important;
  transition: all var(--t-fast) var(--ease-cubic) !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav a.cb-nav-npte-btn:hover,
body.cbd-nordic-theme.cbd-module-page .site-nav a.cb-nav-biz-btn:hover {
  background: var(--glass-bg-hover) !important;
  border-color: var(--glass-border-hi) !important;
  box-shadow: var(--glass-shadow-hover) !important;
  transform: translateY(-1px) !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav a.cb-nav-npte-btn:hover {
  color: var(--accent) !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav a.cb-nav-biz-btn:hover {
  color: var(--accent2) !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav a.cb-nav-pricing-btn {
  background: var(--aurora-gradient) !important;
  color: white !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px var(--blue-glow) !important;
  border: none !important;
  transition: all var(--t-fast) var(--ease-cubic) !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav a.cb-nav-pricing-btn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 16px var(--blue-glow) !important;
  filter: brightness(1.05) !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav a.cb-nav-account-btn {
  border: 1px solid var(--glass-border) !important;
  background: var(--glass-bg) !important;
  color: var(--fg-muted) !important;
  box-shadow: var(--glass-shadow) !important;
  transition: all var(--t-fast) var(--ease-cubic) !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav a.cb-nav-account-btn:hover {
  background: var(--glass-bg-hover) !important;
  border-color: var(--glass-border-hi) !important;
  color: var(--fg) !important;
  box-shadow: var(--glass-shadow-hover) !important;
  transform: translateY(-1px) !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav a.cb-nav-profile-btn {
  border: 1px solid var(--glass-border) !important;
  background: var(--glass-bg) !important;
  color: var(--fg-muted) !important;
  box-shadow: var(--glass-shadow) !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  transition: all var(--t-fast) var(--ease-cubic) !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav a.cb-nav-profile-btn:hover {
  background: var(--glass-bg-hover) !important;
  border-color: var(--glass-border-hi) !important;
  color: var(--fg) !important;
  box-shadow: var(--glass-shadow-hover) !important;
  transform: translateY(-1px) !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav .cb-hy-toggle {
  border: 1px solid var(--glass-border) !important;
  background: var(--glass-bg) !important;
  color: var(--fg-muted) !important;
  box-shadow: var(--glass-shadow) !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-family: var(--font-display), 'Manrope', sans-serif !important;
  font-weight: 700 !important;
  transition: all var(--t-fast) var(--ease-cubic) !important;
  cursor: pointer !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav .cb-hy-toggle:hover {
  background: var(--glass-bg-hover) !important;
  border-color: var(--glass-border-hi) !important;
  color: var(--fg) !important;
  box-shadow: var(--glass-shadow-hover) !important;
  transform: translateY(-1px) !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav .cb-hy-toggle.active {
  background: rgba(244, 171, 67, 0.12) !important;
  border-color: rgba(244, 171, 67, 0.3) !important;
  color: var(--gold) !important;
}

/* Theme Toggle Button trigger style */
body.cbd-nordic-theme.cbd-module-page .site-nav .theme-dd-trigger {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  color: var(--fg-muted) !important;
  border-radius: 8px !important;
  box-shadow: var(--glass-shadow) !important;
  backdrop-filter: var(--glass-filter-ambient) !important;
  -webkit-backdrop-filter: var(--glass-filter-ambient) !important;
  transition: all var(--t-fast) var(--ease-cubic) !important;
}

body.cbd-nordic-theme.cbd-module-page .site-nav .theme-dd-trigger:hover {
  background: var(--glass-bg-hover) !important;
  border-color: var(--glass-border-hi) !important;
  color: var(--fg) !important;
  box-shadow: var(--glass-shadow-hover) !important;
  transform: translateY(-1px) !important;
}

body.cbd-nordic-theme .theme-dd-popover {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  backdrop-filter: var(--glass-filter-anchor) !important;
  -webkit-backdrop-filter: var(--glass-filter-anchor) !important;
  box-shadow: var(--glass-shadow-hover) !important;
  border-radius: 12px !important;
}

body.cbd-nordic-theme .theme-dd-popover .theme-btn {
  color: var(--fg-muted) !important;
  border-radius: 8px !important;
  transition: all var(--t-fast) var(--ease-cubic) !important;
}

body.cbd-nordic-theme .theme-dd-popover .theme-btn:hover {
  background: var(--glass-bg-hover) !important;
  color: var(--fg) !important;
}

body.cbd-nordic-theme .theme-dd-popover .theme-btn.active {
  background: rgba(91, 164, 255, 0.12) !important;
  color: var(--blue) !important;
}

/* Back Link styling overrides */
body.cbd-nordic-theme.cbd-module-page .cb-v3-backwrap {
  max-width: 1200px !important;
  margin: 20px auto 0 !important;
  padding: 0 10px !important;
}

body.cbd-nordic-theme.cbd-module-page .cb-v3-back {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  color: var(--fg-muted) !important;
  padding: 8px 16px !important;
  border-radius: 10px !important;
  box-shadow: var(--glass-shadow) !important;
  backdrop-filter: var(--glass-filter-ambient) !important;
  -webkit-backdrop-filter: var(--glass-filter-ambient) !important;
  transition: all var(--t-fast) var(--ease-cubic) !important;
  display: inline-flex !important;
  align-items: center !important;
  font-family: var(--font-display), 'Manrope', sans-serif !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  gap: 8px !important;
  text-decoration: none !important;
}

body.cbd-nordic-theme.cbd-module-page .cb-v3-back:hover {
  background: var(--glass-bg-hover) !important;
  border-color: var(--glass-border-hi) !important;
  color: var(--fg) !important;
  box-shadow: var(--glass-shadow-hover) !important;
  transform: translateX(-2px) !important;
}

body.cbd-nordic-theme.cbd-module-page .cb-v3-back-arrow {
  transition: transform var(--t-fast) var(--ease-cubic) !important;
}

body.cbd-nordic-theme.cbd-module-page .cb-v3-back:hover .cb-v3-back-arrow {
  transform: translateX(-3px) !important;
}

/* Dynamic wave-bar soundwave animations */
@keyframes bounceWave {
  0% { transform: scaleY(0.3); }
  50% { transform: scaleY(1.0); }
  100% { transform: scaleY(0.3); }
}
.wave-bar {
  transform-origin: bottom;
  transition: transform 0.2s ease-in-out;
}
.wave-bar.playing {
  animation: bounceWave 0.7s ease-in-out infinite alternate;
}
.wave-bar.playing:nth-child(1) { animation-delay: 0.1s; }
.wave-bar.playing:nth-child(2) { animation-delay: 0.4s; }
.wave-bar.playing:nth-child(3) { animation-delay: 0.2s; }
.wave-bar.playing:nth-child(4) { animation-delay: 0.6s; }
.wave-bar.playing:nth-child(5) { animation-delay: 0.3s; }
.wave-bar.playing:nth-child(6) { animation-delay: 0.5s; }
.wave-bar.playing:nth-child(7) { animation-delay: 0.15s; }
.wave-bar.playing:nth-child(8) { animation-delay: 0.7s; }

/* ==========================================================================
   5. CLINICAL MODULE RETINTING & ALIGNMENT (NORDIC AURORA STYLE)
   ========================================================================== */

/* Scoped variables for cb-mod-v4 pages to change emerald green to blue/teal/lavender */
body.cbd-nordic-theme.cb-mod-v4 {
  --v4-ink: var(--bg) !important;
  --v4-ink2: var(--bg) !important;
  --v4-maroon: rgba(91, 164, 255, 0.12) !important;
  --v4-crimson: var(--blue) !important;
  --v4-red: var(--blue) !important;       /* map green to blue */
  --v4-rose: var(--lavender) !important;   /* map rose to lavender */
  --v4-line: var(--glass-border) !important;
  --v4-line-hi: var(--glass-border-hi) !important;
  --v4-accent-rgb: 91, 164, 255 !important;
  --accent: var(--blue) !important;
  --accent2: var(--lavender) !important;
  --ar: 91, 164, 255 !important;
}

/* Hide old red/green galaxy blobs background */
body.cbd-nordic-theme.cb-mod-v4 .v4-aurora {
  display: none !important;
}

/* Strong tags in modules: change green text to ice-blue */
body.cbd-nordic-theme.cb-mod-v4 .cb-v3-main strong {
  color: #d2e4ff !important;
  -webkit-text-fill-color: #d2e4ff !important;
  background: none !important;
}

/* Table of Contents active link and hover */
body.cbd-nordic-theme.cb-mod-v4 .cb-v3-toc-item:hover {
  background: rgba(91, 164, 255, 0.12) !important;
  color: #fff !important;
}
body.cbd-nordic-theme.cb-mod-v4 .cb-v3-toc-item[data-sec].active {
  background: linear-gradient(120deg, rgba(91, 164, 255, 0.22), rgba(15, 23, 42, 0.45)) !important;
  box-shadow: inset 0 0 0 1px rgba(91, 164, 255, 0.42), 0 6px 20px -8px rgba(91, 164, 255, 0.42) !important;
  color: #fff !important;
}
body.cbd-nordic-theme.cb-mod-v4 .cb-v3-toc-item[data-sec].active .cb-v3-toc-n {
  color: var(--lavender) !important;
}

/* Headers and borders */
body.cbd-nordic-theme.cb-mod-v4 .cb-v3-sec-head {
  border-bottom: 1px solid rgba(91, 164, 255, 0.25) !important;
}
body.cbd-nordic-theme.cb-mod-v4 .cb-v3-subhead {
  background: rgba(91, 164, 255, 0.08) !important;
  border-left-color: var(--blue) !important;
  color: var(--lavender) !important;
}

/* Back button */
body.cbd-nordic-theme.cb-mod-v4 .cb-v3-back:hover {
  border-color: rgba(91, 164, 255, 0.5) !important;
}

/* Primary CTA */
body.cbd-nordic-theme.cb-mod-v4 .v4-cta-primary {
  background: linear-gradient(120deg, var(--blue), var(--lavender)) !important;
  box-shadow: 0 10px 30px -8px rgba(91, 164, 255, 0.45) !important;
}
body.cbd-nordic-theme.cb-mod-v4 .v4-cta-primary:hover {
  box-shadow: 0 16px 40px -8px rgba(91, 164, 255, 0.6) !important;
}
body.cbd-nordic-theme.cb-mod-v4 .v4-cta-ghost:hover {
  border-color: rgba(91, 164, 255, 0.45) !important;
}

/* Cards & Accordions hover */
body.cbd-nordic-theme.cb-mod-v4 .cb-v3-main .bl-strip:hover,
body.cbd-nordic-theme.cb-mod-v4 .cb-v3-main .cb-pearl:hover,
body.cbd-nordic-theme.cb-mod-v4 .cb-v3-main .ma-item:hover {
  border-color: rgba(91, 164, 255, 0.35) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07) inset,
              0 18px 38px -24px rgba(0, 0, 0, 0.75),
              0 0 26px -14px rgba(91, 164, 255, 0.35) !important;
}
body.cbd-nordic-theme.cb-mod-v4 .cb-v3-main .ma-header:hover {
  background: rgba(91, 164, 255, 0.08) !important;
}
body.cbd-nordic-theme.cb-mod-v4 .cb-v3-main .ma-body {
  border-top-color: var(--glass-border) !important;
}

/* TL;DR background */
body.cbd-nordic-theme.cb-mod-v4 .cb-v3-main .cb-tldr {
  background: linear-gradient(135deg, rgba(91, 164, 255, 0.1), rgba(255, 255, 255, 0.03)) !important;
}

/* Data Table header */
body.cbd-nordic-theme.cb-mod-v4 .cb-v3-main .data-table th {
  background: rgba(91, 164, 255, 0.12) !important;
}

/* Check toggle button */
body.cbd-nordic-theme.cb-mod-v4 .cb-v3-main .cb-check-toggle {
  background: rgba(91, 164, 255, 0.15) !important;
  border-color: rgba(91, 164, 255, 0.3) !important;
  color: var(--blue) !important;
}

/* Interactive Anatomy Chips and Dots */
body.cbd-nordic-theme.cb-mod-v4 .v4-chip:hover {
  background: rgba(91, 164, 255, 0.1) !important;
  border-color: rgba(91, 164, 255, 0.4) !important;
}
body.cbd-nordic-theme.cb-mod-v4 .v4-chip.active {
  background: linear-gradient(120deg, rgba(91, 164, 255, 0.2), rgba(15, 23, 42, 0.05)) !important;
  border-color: rgba(91, 164, 255, 0.5) !important;
  box-shadow: inset 0 0 0 1px rgba(91, 164, 255, 0.3) !important;
}
body.cbd-nordic-theme.cb-mod-v4 .v4-lead-svg line {
  stroke: var(--blue) !important;
  filter: drop-shadow(0 0 4px rgba(91, 164, 255, 0.8)) !important;
}
body.cbd-nordic-theme.cb-mod-v4 .v4-lbl-hl {
  background: rgba(91, 164, 255, 0.25) !important;
  box-shadow: 0 0 0 1.5px rgba(91, 164, 255, 0.85), 0 0 16px rgba(91, 164, 255, 0.55) !important;
}

/* NPTE Sister Product Callout */
body.cbd-nordic-theme.cb-mod-v4 .cb-npte-callout {
  background: linear-gradient(90deg, rgba(91, 164, 255, 0.1), rgba(15, 23, 42, 0.04)) !important;
  border-color: rgba(91, 164, 255, 0.25) !important;
  border-left-color: var(--blue) !important;
}

/* General overrides for self-checks and assessments */
body.cbd-nordic-theme.cb-mod-v4 .self-check {
  border-color: var(--glass-border) !important;
}
body.cbd-nordic-theme.cb-mod-v4 .cb-assessment-calc {
  border-color: var(--glass-border) !important;
}

/* Show themed canvas particles */
body.cbd-nordic-theme.cb-mod-v4 #cb-bg-galaxy-canvas {
  display: block !important;
  opacity: 0.72 !important;
}
html[data-theme="light"] body.cbd-nordic-theme.cb-mod-v4 #cb-bg-galaxy-canvas {
  display: block !important;
  opacity: 0.55 !important;
}

/* ==========================================================================
   DYNAMIC FLOW WIDGETS (PREMIUM CONTENT DATA DIRECT LOADING)
   ========================================================================== */

@keyframes cb-spin {
  to { transform: rotate(360deg); }
}

.cb-df-wrap {
  margin: 24px 0;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cb-df-tabs {
  display: flex;
  background: rgba(122, 156, 220, 0.08);
  border-bottom: 1px solid var(--glass-border);
  padding: 8px 16px 0;
  gap: 8px;
}

.cb-df-tab {
  padding: 12px 18px;
  border: none;
  background: transparent;
  color: var(--fg-muted);
  font-family: var(--font-display), 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  transition: all var(--t-fast) var(--ease-cubic);
}

.cb-df-tab:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .cb-df-tab:hover {
  background: rgba(255, 255, 255, 0.04);
}

.cb-df-tab.active {
  color: var(--blue);
  background: var(--bg);
  border: 1px solid var(--glass-border);
  border-bottom-color: transparent;
  margin-bottom: -1px;
}

.cb-df-content {
  padding: 24px;
}

.cb-df-panel {
  display: none;
}

.cb-df-panel.active {
  display: block;
  animation: tab-underline-slide 0.35s var(--ease-cubic);
}

/* 1. Video simulation player styles */
.cb-df-media-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 16px;
}

.cb-df-player-wrap {
  background: #070b13;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  position: relative;
}

.cb-df-video-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
}

.cb-df-video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7);
  transition: filter var(--t-medium) var(--ease-cubic);
}

.cb-df-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cb-df-play-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--blue);
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(91, 164, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--t-fast) var(--ease-cubic);
}

.cb-df-play-btn:hover {
  transform: scale(1.1);
}

.cb-df-duration {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-family: 'IBM Plex Mono', monospace;
}

.cb-df-controls {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.9);
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cb-df-ctrl-play {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  min-width: 64px;
  transition: all var(--t-fast);
}

.cb-df-ctrl-play:hover {
  background: rgba(255, 255, 255, 0.25);
}

.cb-df-ctrl-play.playing {
  background: var(--blue);
}

.cb-df-progress-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
}

.cb-df-progress-bar {
  height: 100%;
  background: var(--blue);
  box-shadow: 0 0 8px rgba(91, 164, 255, 0.8);
  transition: width 0.1s linear;
}

.cb-df-time-display {
  color: #b0c2de;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
}

.cb-df-timeline-wrap {
  border: 1px solid var(--glass-border);
  background: rgba(122, 156, 220, 0.04);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.cb-df-timeline-header {
  font-family: var(--font-display), 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 13.5px;
  color: var(--fg);
  margin-bottom: 12px;
}

.cb-df-timeline-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  flex: 1;
}

.cb-df-timeline-item {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all var(--t-fast) var(--ease-cubic);
}

[data-theme="dark"] .cb-df-timeline-item {
  background: rgba(255, 255, 255, 0.03);
}

.cb-df-timeline-item:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: var(--glass-border-hi);
}

[data-theme="dark"] .cb-df-timeline-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cb-df-timeline-item.active {
  background: rgba(91, 164, 255, 0.1) !important;
  border-color: var(--blue) !important;
  box-shadow: 0 0 12px rgba(91, 164, 255, 0.15) !important;
}

.cb-df-tl-time {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  background: rgba(91, 164, 255, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
}

.cb-df-tl-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--fg);
}

.cb-df-description-box {
  background: rgba(122, 156, 220, 0.08);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 14px 18px;
  margin-top: 12px;
}

.cb-df-desc-title {
  font-weight: 800;
  font-size: 14px;
  color: var(--fg);
  margin-bottom: 4px;
}

.cb-df-desc-body {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.5;
}

/* 2. Biomechanics HUD card vector styles */
.cb-df-vectors-grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.cb-df-vector-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all var(--t-fast) var(--ease-cubic);
  position: relative;
  overflow: hidden;
}

.cb-df-vector-card:hover {
  border-color: var(--glass-border-hi);
  transform: translateY(-2px);
}

.cb-df-vector-card.mastered {
  border-color: var(--mint);
  box-shadow: 0 8px 24px rgba(74, 219, 181, 0.15);
  background: rgba(74, 219, 181, 0.03);
}

.cb-df-vector-dir {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--mint);
  letter-spacing: 0.08em;
  background: rgba(74, 219, 181, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
}

.cb-df-vector-title {
  font-family: var(--font-display), 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--fg);
}

.cb-df-vector-detail {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.5;
  flex: 1;
}

.cb-df-vector-master-lbl {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-muted);
  cursor: pointer;
  border-top: 1px solid var(--glass-border);
  padding-top: 12px;
  margin-top: 8px;
}

.cb-df-vector-master-lbl input {
  accent-color: var(--mint);
}

.cb-vector-sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  pointer-events: none;
  animation: sparkle-float-up 0.8s ease-out forwards;
}

@keyframes sparkle-float-up {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-40px) scale(0); opacity: 0; }
}

/* 3. Diagnostic tree styles */
.cb-df-tree-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}

.cb-df-tree-interactive {
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 24px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

[data-theme="dark"] .cb-df-tree-interactive {
  background: rgba(255, 255, 255, 0.02);
}

.cb-df-tree-question {
  font-family: var(--font-display), 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--fg);
  line-height: 1.4;
}

.cb-df-tree-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cb-df-choice-btn {
  width: 100%;
  padding: 14px 18px;
  text-align: left;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--fg);
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--glass-shadow);
  transition: all var(--t-fast) var(--ease-cubic);
}

.cb-df-choice-btn:hover {
  border-color: var(--blue);
  background: var(--glass-bg-hover);
  transform: translateX(4px);
}

.cb-df-final-diagnosis {
  background: linear-gradient(135deg, rgba(244, 171, 67, 0.1) 0%, rgba(91, 164, 255, 0.1) 100%);
  border: 1px solid var(--gold);
  padding: 20px;
  border-radius: 12px;
  color: var(--fg);
  font-size: 14px;
  line-height: 1.6;
  animation: tab-underline-slide 0.4s var(--ease-cubic);
}

.cb-df-tree-sidebar {
  border: 1px solid var(--glass-border);
  background: rgba(122, 156, 220, 0.04);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 400px;
}

.cb-df-sidebar-title {
  font-family: var(--font-display), 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: var(--fg);
}

.cb-df-ledger-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex: 1;
}

.cb-df-ledger-empty {
  font-size: 12.5px;
  color: var(--fg-subtle);
  font-style: italic;
  text-align: center;
  padding: 40px 0;
}

.cb-df-ledger-item {
  border-left: 2.5px solid var(--blue);
  padding-left: 10px;
  font-size: 12px;
  line-height: 1.4;
  animation: tab-underline-slide 0.3s var(--ease-cubic);
}

.cb-df-ledger-q {
  color: var(--fg-subtle);
  margin-bottom: 2px;
}

.cb-df-ledger-a {
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 2px;
}

.cb-df-ledger-o {
  color: var(--blue);
  font-style: italic;
}

.cb-df-tree-reset-btn {
  padding: 10px;
  border: none;
  background: var(--blue);
  color: white;
  font-family: var(--font-display), 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.2s;
  box-shadow: 0 4px 12px var(--blue-glow);
}

.cb-df-tree-reset-btn:hover {
  opacity: 0.9;
}

@media (max-width: 900px) {
  .cb-df-media-grid, .cb-df-tree-layout {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   NORDIC EDITORIAL REDESIGN OVERRIDES (v896)
   ========================================================================== */

/* 1. Page & Panel Container Adjustments */
body.cbd-nordic-theme .tab-panel {
  background: transparent !important;
  width: 100% !important;
  min-height: 400px !important;
}

body.cbd-nordic-theme .tab-panel .container {
  padding: 40px 48px !important;
  max-width: 960px !important; /* Extremely readable line measure */
  margin: 0 auto !important;
}

@media (max-width: 768px) {
  body.cbd-nordic-theme .tab-panel .container {
    padding: 24px 20px !important;
  }
}

/* 2. Sleek Typography Redesign */
body.cbd-nordic-theme .section-title {
  font-family: var(--font-display), 'Fraunces', Georgia, serif !important;
  font-size: 32px !important;
  font-weight: 700 !important;
  color: var(--fg) !important;
  margin-top: 48px !important;
  margin-bottom: 12px !important;
  letter-spacing: -0.02em !important;
  position: relative !important;
  display: block !important;
}

body.cbd-nordic-theme .section-title::before {
  content: none !important;
  display: none !important; /* Hide section symbol § */
}

body.cbd-nordic-theme .section-title::after {
  content: none !important;
  display: none !important; /* Hide underline bar */
}

body.cbd-nordic-theme .section-sub {
  font-family: var(--font-body), 'Manrope', sans-serif !important;
  font-size: 15.5px !important;
  color: var(--fg-muted) !important;
  line-height: 1.65 !important;
  margin-top: 0 !important;
  margin-bottom: 32px !important;
}

/* 3. Callout Box (bl-strip) Redesign */
body.cbd-nordic-theme .bl-strip {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  border-left: 4px solid var(--fg-subtle) !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02) !important;
  padding: 24px 28px !important;
  margin: 24px 0 !important;
  transition: all var(--t-fast) var(--ease-cubic) !important;
  overflow: visible !important;
}

body.cbd-nordic-theme .bl-strip:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04) !important;
}

/* Color thematic variations for callout strips */
body.cbd-nordic-theme .bl-strip.purple {
  border-left-color: var(--purple) !important;
  background: rgba(167, 139, 250, 0.04) !important;
}
body.cbd-nordic-theme .bl-strip.gold {
  border-left-color: var(--gold) !important;
  background: rgba(244, 171, 67, 0.04) !important;
}
body.cbd-nordic-theme .bl-strip.red {
  border-left-color: var(--red) !important;
  background: rgba(239, 68, 68, 0.04) !important;
}
body.cbd-nordic-theme .bl-strip.green {
  border-left-color: var(--mint) !important;
  background: rgba(52, 211, 153, 0.04) !important;
}
body.cbd-nordic-theme .bl-strip.orange {
  border-left-color: var(--orange) !important;
  background: rgba(249, 115, 22, 0.04) !important;
}

/* Light mode adjustments for strips to maintain high contrast */
body.cbd-nordic-theme[data-theme="light"] .bl-strip.purple { background: rgba(167, 139, 250, 0.07) !important; }
body.cbd-nordic-theme[data-theme="light"] .bl-strip.gold { background: rgba(244, 171, 67, 0.07) !important; }
body.cbd-nordic-theme[data-theme="light"] .bl-strip.red { background: rgba(239, 68, 68, 0.07) !important; }
body.cbd-nordic-theme[data-theme="light"] .bl-strip.green { background: rgba(52, 211, 153, 0.07) !important; }
body.cbd-nordic-theme[data-theme="light"] .bl-strip.orange { background: rgba(249, 115, 22, 0.07) !important; }

/* Sleek bl-label formatting without indicators */
body.cbd-nordic-theme .bl-strip .bl-label {
  font-family: var(--font-display), 'Manrope', sans-serif !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: var(--fg) !important;
  margin-bottom: 12px !important;
  display: inline-block !important;
  border-bottom: 2px solid var(--fg-subtle) !important;
  padding-bottom: 3px !important;
  position: relative !important;
}

body.cbd-nordic-theme .bl-strip .bl-label::before {
  content: none !important;
  display: none !important; /* Hide dot indicator */
}

body.cbd-nordic-theme .bl-strip.purple .bl-label { border-bottom-color: var(--purple) !important; }
body.cbd-nordic-theme .bl-strip.gold .bl-label { border-bottom-color: var(--gold) !important; }
body.cbd-nordic-theme .bl-strip.red .bl-label { border-bottom-color: var(--red) !important; }
body.cbd-nordic-theme .bl-strip.green .bl-label { border-bottom-color: var(--mint) !important; }
body.cbd-nordic-theme .bl-strip.orange .bl-label { border-bottom-color: var(--orange) !important; }

/* 4. Sleek Numbered Lists (cb-numlist) */
body.cbd-nordic-theme .cb-numlist {
  list-style: none !important;
  list-style-type: none !important;
  padding-left: 0 !important;
}
body.cbd-nordic-theme.cbd-module-page .bl-strip ul.cb-numlist {
  list-style-type: none !important;
  padding-left: 0 !important;
  margin: 10px 0 6px !important;
}
body.cbd-nordic-theme.cbd-module-page .tc-card ul.cb-numlist,
body.cbd-nordic-theme.cbd-module-page .ma-body ul.cb-numlist {
  list-style-type: none !important;
  padding-left: 0 !important;
  margin: 14px 0 20px !important;
}
body.cbd-nordic-theme .cb-numlist > li {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  border-left: 3px solid var(--blue) !important;
  border-radius: 10px !important;
  padding: 16px 20px 16px 52px !important;
  margin: 12px 0 !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
  box-shadow: none !important;
}

body.cbd-nordic-theme .cb-numlist > li:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  border-left-color: var(--blue) !important;
  transform: none !important;
}

[data-theme="dark"] body.cbd-nordic-theme .cb-numlist > li:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}

body.cbd-nordic-theme .cb-numlist > li::before {
  left: 14px !important;
  top: 14px !important;
  width: 26px !important;
  height: 26px !important;
  background: rgba(91, 164, 255, 0.1) !important;
  color: var(--blue) !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  border-radius: 50% !important;
}

/* ==========================================================================
   MODULE VISUAL OVERHAUL & LAYOUT REDESIGN
   ========================================================================== */

/* 1. V3 Layout Split Window Overrides (e.g. Shoulder Complex) */
body.cbd-nordic-theme .cb-v3-layout {
  display: grid !important;
  grid-template-columns: 240px 1fr !important;
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 20px !important;
  box-shadow: var(--glass-shadow) !important;
  backdrop-filter: var(--glass-filter-standard) !important;
  -webkit-backdrop-filter: var(--glass-filter-standard) !important;
  overflow: hidden !important;
  max-width: 1200px !important;
  margin: 20px auto 50px !important;
  height: calc(100vh - 140px) !important;
  align-items: stretch !important;
}

[data-theme="dark"] body.cbd-nordic-theme .cb-v3-layout {
  background: var(--glass-bg) !important;
}

/* Secondary Navigation TOC Rail */
body.cbd-nordic-theme .cb-v3-toc {
  width: 240px !important;
  height: 100% !important;
  position: static !important;
  top: auto !important;
  border-right: 1px solid var(--glass-border) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  padding: 24px 16px !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  flex-shrink: 0 !important;
  backdrop-filter: var(--glass-filter-ambient) !important;
  -webkit-backdrop-filter: var(--glass-filter-ambient) !important;
}

[data-theme="dark"] body.cbd-nordic-theme .cb-v3-toc {
  background: rgba(0, 0, 0, 0.08) !important;
}

/* Content Viewer Panel Scrollable Override */
body.cbd-nordic-theme .cb-v3-main {
  flex: 1 !important;
  height: 100% !important;
  overflow-y: auto !important;
  padding: 30px 40px !important;
  scroll-behavior: smooth !important;
  background: transparent !important;
}

/* 2. Hero Card Glassmorphic Upgrades */
body.cbd-nordic-theme.cb-mod-v4 .v4-hero-card {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: var(--glass-shadow) !important;
  backdrop-filter: var(--glass-filter-anchor) !important;
  -webkit-backdrop-filter: var(--glass-filter-anchor) !important;
  border-radius: 20px !important;
}

[data-theme="dark"] body.cbd-nordic-theme.cb-mod-v4 .v4-hero-card {
  background: rgba(15, 23, 42, 0.45) !important;
}

body.cbd-nordic-theme.cb-mod-v4 .v4-hero-title {
  color: var(--fg) !important;
}

body.cbd-nordic-theme.cb-mod-v4 .v4-hero-tagline {
  color: var(--fg-muted) !important;
}

/* 3. Transparent Illustration Backdrop & Dark mode glow */
body.cbd-nordic-theme.cb-mod-v4 .v4-anat-imgwrap img,
body.cbd-nordic-theme.cb-mod-v4 .cb-anatomy-figure img,
body.cbd-nordic-theme.cb-mod-v4 .v4-anat-figure img,
body.cbd-nordic-theme.cb-mod-v4 img[src*="_nordic"] {
  background: transparent !important;
  border: 1px solid var(--glass-border) !important;
}

[data-theme="dark"] body.cbd-nordic-theme.cb-mod-v4 .v4-anat-imgwrap img,
[data-theme="dark"] body.cbd-nordic-theme.cb-mod-v4 .cb-anatomy-figure img,
[data-theme="dark"] body.cbd-nordic-theme.cb-mod-v4 .v4-anat-figure img,
[data-theme="dark"] body.cbd-nordic-theme.cb-mod-v4 img[src*="_nordic"] {
  background: rgba(15, 23, 42, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* 4. Play button pulse animation for Video Simulator */
@keyframes play-btn-pulse {
  0% { transform: scale(0.96); box-shadow: 0 4px 14px rgba(91, 164, 255, 0.4); }
  50% { transform: scale(1.04); box-shadow: 0 8px 26px rgba(91, 164, 255, 0.65); }
  100% { transform: scale(0.96); box-shadow: 0 4px 14px rgba(91, 164, 255, 0.4); }
}

body.cbd-nordic-theme .cb-df-play-btn {
  animation: play-btn-pulse 2.5s ease-in-out infinite !important;
}

body.cbd-nordic-theme .cb-df-play-btn:hover {
  animation: none !important;
  transform: scale(1.1) !important;
  box-shadow: 0 10px 30px rgba(91, 164, 255, 0.8) !important;
}

/* Responsive collapse for split V3 layouts */
@media (max-width: 900px) {
  body.cbd-nordic-theme .cb-v3-layout {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
  }
  
  body.cbd-nordic-theme .cb-v3-toc {
    width: 100% !important;
    height: auto !important;
    border-right: none !important;
    border-bottom: 1px solid var(--glass-border) !important;
  }
}

/* 5. Clean up top header elements on module pages to align TOC sidebar right below CTA buttons (matching Image 2) */
body.cbd-module-page .cb-v3-hero,
body.cbd-module-page .cb-v3-anchor-strip,
body.cbd-module-page .cb-v3-backwrap,
body.cbd-module-page .cb-npte-callout {
  display: none !important;
}

/* Premium Glassmorphic Hero Card for module pages */
body.cbd-nordic-theme.cbd-module-page .v4-hero-card {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: var(--glass-shadow) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  padding: 32px 36px !important;
  margin: 0 !important;
  border-radius: 20px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
}

body.cbd-nordic-theme.cbd-module-page .v4-hero {
  margin: 24px 0 20px 0 !important;
  max-width: 1200px !important;
  width: 100% !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

body.cbd-nordic-theme.cbd-module-page .v4-hero-title {
  color: var(--fg) !important;
  font-family: 'Manrope', sans-serif !important;
  font-weight: 800 !important;
  font-size: 36px !important;
  margin-bottom: 12px !important;
}

body.cbd-nordic-theme.cbd-module-page .v4-grad-text {
  background: var(--aurora-gradient) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  display: inline-block !important;
}

body.cbd-nordic-theme.cbd-module-page .v4-hero-tagline {
  color: var(--fg-muted) !important;
  max-width: 72ch !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  margin-bottom: 20px !important;
}

/* Solid mint primary CTA and outlined mint ghost CTA */
body.cbd-nordic-theme.cbd-module-page .v4-cta-primary {
  background: var(--mint) !important;
  color: #0b0f19 !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px var(--mint-glow) !important;
  border: none !important;
  transition: all var(--t-fast) var(--ease-cubic) !important;
}

body.cbd-nordic-theme.cbd-module-page .v4-cta-primary:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px var(--mint-glow) !important;
  filter: brightness(1.1) !important;
}

body.cbd-nordic-theme.cbd-module-page .v4-cta-ghost {
  background: transparent !important;
  border: 1px solid var(--mint) !important;
  color: var(--mint) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  font-weight: 700 !important;
  transition: all var(--t-fast) var(--ease-cubic) !important;
}

body.cbd-nordic-theme.cbd-module-page .v4-cta-ghost:hover {
  background: rgba(74, 219, 181, 0.08) !important;
  border-color: var(--mint) !important;
  transform: translateY(-1px) !important;
}

/* Enable vertical scroll and let layout expand to fill the wider viewport */
@media (min-width: 901px) {
  body.cbd-nordic-theme.cbd-module-page {
    overflow: visible !important;
  }
  
  body.cbd-nordic-theme.cbd-module-page .cb-v3-layout {
    height: auto !important;
    max-width: 1200px !important;
    margin: 20px 0 50px 0 !important;
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    display: grid !important;
    grid-template-columns: 240px 1fr !important;
    gap: 24px !important;
  }

  body.cbd-nordic-theme.cbd-module-page .cb-v3-toc {
    position: sticky !important;
    top: 30px !important;
    max-height: calc(100vh - 60px) !important;
    overflow-y: auto !important;
    align-self: start !important;
    height: auto !important;
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-shadow) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border-radius: 20px !important;
    padding: 24px 16px !important;
    box-sizing: border-box !important;
  }
  [data-theme="dark"] body.cbd-nordic-theme.cbd-module-page .cb-v3-toc {
    background: rgba(15, 23, 42, 0.45) !important;
  }
  
  body.cbd-nordic-theme.cbd-module-page .cb-v3-main {
    height: auto !important;
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}

/* Interactive Anatomy Widget (.v4-anat) Overrides for Nordic Theme */
@media (min-width: 761px) {
  body.cbd-nordic-theme.cbd-module-page .v4-anat {
    display: grid !important;
    grid-template-columns: minmax(320px, 1fr) minmax(0, 1.2fr) !important;
    grid-template-rows: auto auto !important;
    gap: 20px 24px !important;
    align-items: start !important;
    max-width: 100% !important;
    margin: 20px 0 !important;
  }

  body.cbd-nordic-theme.cbd-module-page .v4-anat-left {
    display: contents !important;
  }

  /* Row 1, Column 1: Clickable chips list */
  body.cbd-nordic-theme.cbd-module-page .v4-anat-list {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: stretch !important;
    margin: 0 !important;
  }

  /* Row 1, Column 2: Interactive image figure */
  body.cbd-nordic-theme.cbd-module-page .v4-anat-figure {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: stretch !important;
    margin: 0 !important;
  }

  /* Restrict diagram image wrapper to keep Row 1 compact and prevent scaling drift */
  body.cbd-nordic-theme.cbd-module-page .v4-anat-imgwrap {
    max-height: 360px !important;
    max-width: 360px !important;
    margin: 0 auto !important;
  }

  /* Row 2: Details panel spans full width below the two cards */
  body.cbd-nordic-theme.cbd-module-page .v4-anat-panel {
    grid-column: 1 / span 2 !important;
    grid-row: 2 !important;
    align-self: start !important;
    margin: 0 !important;
    
    /* Horizontal 2-column layout inside the details panel on desktop */
    display: grid !important;
    grid-template-columns: 1.2fr 1fr !important;
    gap: 20px 32px !important;
    align-items: start !important;
  }

  body.cbd-nordic-theme.cbd-module-page .v4-anat-panel-col1 {
    grid-column: 1 / span 2 !important;
  }

  body.cbd-nordic-theme.cbd-module-page .v4-anat-panel:has(.v4-anat-panel-col2) .v4-anat-panel-col1 {
    grid-column: 1 !important;
  }

  body.cbd-nordic-theme.cbd-module-page .v4-anat-panel-col2 {
    grid-column: 2 !important;
  }
}

@media (max-width: 760px) {
  body.cbd-nordic-theme.cbd-module-page .v4-anat {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto auto !important;
    gap: 16px !important;
  }
  body.cbd-nordic-theme.cbd-module-page .v4-anat-left {
    display: contents !important;
  }
  body.cbd-nordic-theme.cbd-module-page .v4-anat-figure {
    grid-row: 1 !important;
    grid-column: 1 !important;
  }
  body.cbd-nordic-theme.cbd-module-page .v4-anat-list {
    grid-row: 2 !important;
    grid-column: 1 !important;
  }
  body.cbd-nordic-theme.cbd-module-page .v4-anat-panel {
    grid-row: 3 !important;
    grid-column: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }
}

/* Hide descriptive caption text but keep a tiny, subtle credit link */
body.cbd-nordic-theme.cbd-module-page .v4-anat-figure figcaption {
  font-size: 0 !important;
  margin-top: 4px !important;
  padding: 0 !important;
  text-align: right !important;
  line-height: 1 !important;
}
body.cbd-nordic-theme.cbd-module-page .v4-anat-figure figcaption strong {
  display: none !important;
}
body.cbd-nordic-theme.cbd-module-page .v4-anat-figure figcaption a {
  font-size: 10px !important;
  color: var(--v4-text3) !important;
  text-decoration: underline !important;
  opacity: 0.7 !important;
  transition: opacity 0.15s ease !important;
  display: inline-block !important;
}
body.cbd-nordic-theme.cbd-module-page .v4-anat-figure figcaption a:hover {
  opacity: 1 !important;
}

/* ==========================================================================
   NORDIC AURORA GALAXY GLASSMORPHISM OVERHAUL
   ========================================================================== */

/* Remove parent masking backdrops to let the background aurora blobs and stars display cleanly */
body.cbd-nordic-theme .cb-v3-main {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Accordion containers (.ma-item) - glassy, high-transparency panels */
body.cbd-nordic-theme .ma-item {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 16px !important;
  box-shadow: var(--glass-shadow) !important;
  backdrop-filter: var(--glass-filter-standard) !important;
  -webkit-backdrop-filter: var(--glass-filter-standard) !important;
  overflow: hidden !important;
  transition: transform var(--t-medium) var(--ease-cubic), border-color var(--t-medium) var(--ease-cubic), background var(--t-medium) var(--ease-cubic), box-shadow var(--t-medium) var(--ease-cubic) !important;
}
[data-theme="dark"] body.cbd-nordic-theme .ma-item {
  background: rgba(10, 15, 30, 0.2) !important;
}
body.cbd-nordic-theme .ma-item:hover {
  transform: translateY(-2px) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: var(--glass-border-hi) !important;
  box-shadow: var(--glass-shadow-hover) !important;
}
[data-theme="dark"] body.cbd-nordic-theme .ma-item:hover {
  background: rgba(10, 15, 30, 0.3) !important;
}

/* Accordion open bodies (.ma-body) - transparent to avoid stacking background colors */
body.cbd-nordic-theme .ma-body {
  background: transparent !important;
  border-top: 1px solid var(--glass-border) !important;
}

/* Callout blocks (.bl-strip) and detail cards (.tc-card) */
body.cbd-nordic-theme .bl-strip,
body.cbd-nordic-theme .tc-card {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  border-left: 4px solid var(--fg-subtle) !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
  padding: 24px 28px !important;
  margin: 24px 0 !important;
  transition: transform var(--t-fast) var(--ease-cubic), border-color var(--t-fast) var(--ease-cubic), background var(--t-fast) var(--ease-cubic), box-shadow var(--t-fast) var(--ease-cubic) !important;
}
body.cbd-nordic-theme .bl-strip:hover,
body.cbd-nordic-theme .tc-card:hover {
  transform: translateY(-2px) !important;
  border-color: var(--glass-border-hi) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

/* Detail Card (.tc-card) inner section styling */
body.cbd-nordic-theme .tc-card .tc-section {
  border-top: 1px solid var(--glass-border) !important;
  background: transparent !important;
}

/* Color variations for bl-strips and tc-cards - low-opacity color washing */
body.cbd-nordic-theme .bl-strip.purple, body.cbd-nordic-theme .tc-card.purple { border-left-color: var(--purple) !important; background: rgba(167, 139, 250, 0.035) !important; }
body.cbd-nordic-theme .bl-strip.gold,   body.cbd-nordic-theme .tc-card.gold   { border-left-color: var(--gold) !important; background: rgba(244, 171, 67, 0.035) !important; }
body.cbd-nordic-theme .bl-strip.red,    body.cbd-nordic-theme .tc-card.red    { border-left-color: var(--red) !important; background: rgba(239, 68, 68, 0.035) !important; }
body.cbd-nordic-theme .bl-strip.green,  body.cbd-nordic-theme .tc-card.green  { border-left-color: var(--mint) !important; background: rgba(52, 211, 153, 0.035) !important; }
body.cbd-nordic-theme .bl-strip.orange, body.cbd-nordic-theme .tc-card.orange { border-left-color: var(--orange) !important; background: rgba(249, 115, 22, 0.035) !important; }

body.cbd-nordic-theme[data-theme="light"] .bl-strip.purple, body.cbd-nordic-theme[data-theme="light"] .tc-card.purple { background: rgba(167, 139, 250, 0.06) !important; }
body.cbd-nordic-theme[data-theme="light"] .bl-strip.gold,   body.cbd-nordic-theme[data-theme="light"] .tc-card.gold   { background: rgba(244, 171, 67, 0.06) !important; }
body.cbd-nordic-theme[data-theme="light"] .bl-strip.red,    body.cbd-nordic-theme[data-theme="light"] .tc-card.red    { background: rgba(239, 68, 68, 0.06) !important; }
body.cbd-nordic-theme[data-theme="light"] .bl-strip.green,  body.cbd-nordic-theme[data-theme="light"] .tc-card.green  { background: rgba(52, 211, 153, 0.06) !important; }
body.cbd-nordic-theme[data-theme="light"] .bl-strip.orange, body.cbd-nordic-theme[data-theme="light"] .tc-card.orange { background: rgba(249, 115, 22, 0.06) !important; }

/* ==========================================================================
   APPLE LIQUID GLASS REDESIGN EXTENSIONS
   ========================================================================== */

/* 1. Metallic and Chromatic Typography Gradients */
body.cbd-nordic-theme h1,
body.cbd-nordic-theme h2,
body.cbd-nordic-theme h3,
body.cbd-nordic-theme .welcome-title,
body.cbd-nordic-theme .brand-name {
  background: var(--metallic-gradient) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  display: inline-block;
}

body.cbd-nordic-theme[data-theme="dark"] h1,
body.cbd-nordic-theme[data-theme="dark"] h2,
body.cbd-nordic-theme[data-theme="dark"] h3,
body.cbd-nordic-theme[data-theme="dark"] .welcome-title,
body.cbd-nordic-theme[data-theme="dark"] .brand-name {
  background: var(--metallic-gradient) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

/* 2. Detail Card (.tc-card) Premium Glass Overrides */
body.cbd-nordic-theme .tc-card {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 16px !important;
  box-shadow: var(--glass-shadow) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  transition: all var(--t-fast) var(--ease-cubic) !important;
}

body.cbd-nordic-theme .tc-card:hover {
  border-color: var(--glass-border-hi) !important;
  background: var(--glass-bg-hover) !important;
  box-shadow: var(--glass-shadow-hover), 0 10px 30px rgba(91, 164, 255, 0.08) !important;
  transform: translateY(-3px) scale(1.01) !important;
}

/* 3. Header Input & Widgets Glassmorphism */
body.cbd-nordic-theme .search-input,
body.cbd-nordic-theme .user-profile-widget {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: var(--glass-shadow) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border-radius: 12px !important;
}

body.cbd-nordic-theme .search-input:focus {
  background: var(--glass-bg-hover) !important;
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 3px rgba(91, 164, 255, 0.25) !important;
}

/* 4. Sidebar Toggle Specular Bevel Overlay */
body.cbd-nordic-theme .sidebar-toggle {
  background: var(--glass-bg) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: var(--glass-shadow) !important;
}

body.cbd-nordic-theme .sidebar-toggle:hover {
  background: var(--glass-bg-hover) !important;
  border-color: var(--glass-border-hi) !important;
  box-shadow: var(--glass-shadow-hover), 0 4px 12px var(--blue-glow) !important;
}

/* ==========================================================================
   APPLE LIQUID GLASS REDESIGN EXTENSIONS — VISUAL & LAYOUT FIXES
   ========================================================================== */

/* 1. Hide site-nav (top nav bar) completely under Nordic Theme */
body.cbd-nordic-theme .site-nav {
  display: none !important;
}

/* 2. Style the Sidebar Theme Toggle Dropdown trigger */
.sidebar .theme-toggle {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
}
.sidebar .theme-dd-trigger {
  width: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 14px !important;
  height: 40px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 10px !important;
  color: var(--fg) !important;
  transition: all var(--t-fast) var(--ease-cubic) !important;
}
.sidebar .theme-dd-trigger:hover {
  background: var(--glass-bg-hover) !important;
  border-color: var(--glass-border-hi) !important;
  box-shadow: var(--glass-shadow-hover) !important;
}
[data-theme="dark"] .sidebar .theme-dd-trigger {
  background: rgba(10, 15, 30, 0.45) !important;
}
[data-theme="dark"] .sidebar .theme-dd-trigger:hover {
  background: rgba(15, 22, 45, 0.60) !important;
}

/* 3. Left-align Knee Complex and module titles */
body.cbd-nordic-theme.cbd-module-page .v4-hero,
body.cbd-nordic-theme.cbd-module-page .v4-hero-card {
  text-align: left !important;
  align-items: flex-start !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
}
body.cbd-nordic-theme.cbd-module-page .v4-hero-title,
body.cbd-nordic-theme.cbd-module-page .v4-hero-tagline,
body.cbd-nordic-theme.cbd-module-page .v4-hero-cta {
  text-align: left !important;
  justify-content: flex-start !important;
}
body.cbd-nordic-theme.cbd-module-page h2 {
  text-align: left !important;
}

/* 4. Enhance gradient text contrast and boldness */
body.cbd-nordic-theme.cbd-module-page .v4-grad-text {
  background: linear-gradient(135deg, #a7f3d0 0%, #60a5fa 50%, #c084fc 100%) !important;
  font-weight: 900 !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  display: inline-block !important;
}
body.cbd-nordic-theme.cbd-module-page[data-theme="light"] .v4-grad-text {
  background: linear-gradient(135deg, #059669 0%, #1d4ed8 50%, #6d28d9 100%) !important;
}

/* 5. Smaller card and list formatting + bullet points */
body.cbd-nordic-theme.cbd-module-page .bl-strip,
body.cbd-nordic-theme.cbd-module-page .tc-card,
body.cbd-nordic-theme.cbd-module-page .ma-body {
  font-size: 13.5px !important;
  line-height: 1.5 !important;
}
body.cbd-nordic-theme.cbd-module-page .bl-strip p,
body.cbd-nordic-theme.cbd-module-page .tc-card p,
body.cbd-nordic-theme.cbd-module-page .ma-body p {
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  margin-bottom: 8px !important;
}
body.cbd-nordic-theme.cbd-module-page .bl-strip ul,
body.cbd-nordic-theme.cbd-module-page .tc-card ul,
body.cbd-nordic-theme.cbd-module-page .ma-body ul {
  padding-left: 18px !important;
  margin: 6px 0 !important;
  list-style-type: disc !important;
}
body.cbd-nordic-theme.cbd-module-page .bl-strip li,
body.cbd-nordic-theme.cbd-module-page .tc-card li,
body.cbd-nordic-theme.cbd-module-page .ma-body li {
  font-size: 13px !important;
  line-height: 1.45 !important;
  margin-bottom: 5px !important;
}

/* 6. Double-column layout overrides for ma-body-cols */
body.cbd-nordic-theme.cbd-module-page .ma-body-cols {
  display: flex !important;
  flex-direction: row !important;
  gap: 20px !important;
}
body.cbd-nordic-theme.cbd-module-page .ma-body-cols > div {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}
@media (max-width: 768px) {
  body.cbd-nordic-theme.cbd-module-page .ma-body-cols {
    flex-direction: column !important;
  }
}

/* 7. Clinical Module Layout and Interactivity Fixes */

/* Origin, Insertion, Nerve, Action (OINA) list styling */
body.cbd-nordic-theme.cbd-module-page .v4-oina-mode .v4-anat-pts li {
  padding-left: 0 !important;
  display: flex !important;
  gap: 10px !important;
  align-items: baseline !important;
}
body.cbd-nordic-theme.cbd-module-page .v4-oina-mode .v4-anat-pts li::before {
  display: none !important;
}
body.cbd-nordic-theme.cbd-module-page .oina-l {
  flex: 0 0 84px !important;
  font-family: 'IBM Plex Mono', monospace !important;
  font-size: 11px !important;
  letter-spacing: .6px !important;
  text-transform: uppercase !important;
  color: var(--accent) !important;
  font-weight: 700 !important;
  padding-top: 1px !important;
}
body.cbd-nordic-theme.cbd-module-page .v4-oina-pearl {
  margin-top: 16px !important;
  padding: 14px 16px !important;
  background: rgba(var(--ar), .08) !important;
  border: 1px solid var(--v4-line) !important;
  border-radius: 12px !important;
  font-size: 13.5px !important;
  line-height: 1.6 !important;
  color: var(--v4-text2) !important;
}
body.cbd-nordic-theme.cbd-module-page .v4-oina-pearl b {
  display: block !important;
  font-family: 'IBM Plex Mono', monospace !important;
  font-size: 10px !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
  color: var(--accent) !important;
  margin-bottom: 6px !important;
}

/* Premium illustrations bypass */
body.cbd-nordic-theme[data-theme="dark"].cbd-module-page .v4-anat-imgwrap img,
body.cbd-nordic-theme[data-theme="dark"].cbd-module-page .v4-anat-figure > img,
body.cbd-nordic-theme[data-theme="dark"].cbd-module-page .cb-anatomy-figure img[src*=".webp"],
body.cbd-nordic-theme[data-theme="dark"].cbd-module-page .cb-figure-pair img[src*=".webp"] {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

/* Specificity bug override for dark theme: force transparent background, no borders, no padding on v4-hero-card */
/* Specificity bug override for dark theme: style the glass background card correctly */
body.cbd-nordic-theme.cbd-module-page .v4-hero-card {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: var(--glass-shadow) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
}
body.cbd-nordic-theme[data-theme="dark"].cbd-module-page .v4-hero-card {
  background: rgba(15, 23, 42, 0.45) !important;
}

/* Tighten spacing around the hero header on module pages and left-align them */
body.cbd-nordic-theme.cbd-module-page .v4-hero {
  margin: 24px 0 20px 0 !important;
  max-width: 1200px !important;
}
body.cbd-nordic-theme.cbd-module-page .cb-v3-layout {
  margin-top: 20px !important;
}

/* Hide the empty V3 hero container that creates large vertical gap */
body.cbd-nordic-theme.cbd-module-page .container:has(> .cb-v3-hero) {
  display: none !important;
}

/* Redesign overrides to fix figures layout in the Nordic Aurora theme */
body.cbd-nordic-theme.cbd-module-page .cb-figure-pair {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 20px !important;
  max-width: 100% !important;
  margin: 22px auto !important;
  align-items: stretch !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
}
body.cbd-nordic-theme.cbd-module-page .cb-figure-pair > .cb-anatomy-figure {
  flex: 1 1 calc(50% - 10px) !important;
  min-width: 280px !important;
  max-width: 580px !important;
  margin: 0 !important;
  content-visibility: visible !important;
  display: flex !important;
  flex-direction: column !important;
}
body.cbd-nordic-theme.cbd-module-page .cb-figure-pair > .cb-anatomy-figure figcaption {
  margin-top: auto !important;
  padding-top: 12px !important;
}

/* Fix Intersection Observer visibility bugs in the active section */
body.cbd-nordic-theme.cbd-module-page.cb-mod-v3 .cb-v3-main > .cb-v3-sec.active .ma-item,
body.cbd-nordic-theme.cbd-module-page.cb-mod-v3 .cb-v3-main > .cb-v3-sec.active .rc2,
body.cbd-nordic-theme.cbd-module-page.cb-mod-v3 .cb-v3-main > .cb-v3-sec.active .bl-strip {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Fix nested cb-numlist items inside bl-strips in the Nordic theme to prevent card-in-card visual clash */
body.cbd-nordic-theme.cbd-module-page .bl-strip .cb-numlist > li {
  background: rgba(255, 255, 255, 0.03) !important;
  border: none !important;
  border-left: 3px solid var(--blue) !important;
  box-shadow: none !important;
  padding: 12px 16px 12px 46px !important;
  margin: 8px 0 !important;
}
body.cbd-nordic-theme[data-theme="light"].cbd-module-page .bl-strip .cb-numlist > li {
  background: rgba(0, 0, 0, 0.02) !important;
  border-left-color: var(--mint) !important;
}
body.cbd-nordic-theme.cbd-module-page .bl-strip .cb-numlist > li::before {
  left: 12px !important;
  top: 10px !important;
  background: rgba(91, 164, 255, 0.1) !important;
  color: var(--blue) !important;
}
body.cbd-nordic-theme[data-theme="light"].cbd-module-page .bl-strip .cb-numlist > li::before {
  background: rgba(5, 150, 105, 0.1) !important;
  color: #059669 !important;
}



/* Shift content area of module pages to clear the fixed sidebar and align with the dashboard grid */
@media (min-width: 801px) {
  body.cbd-nordic-theme.cbd-module-page {
    padding: 0 !important;
    margin: 0 !important;
  }
}

@media (max-width: 800px) {
  body.cbd-nordic-theme.cbd-module-page {
    padding: 0 !important;
    margin: 0 !important;
  }
  
  body.cbd-nordic-theme.cbd-module-page .v4-hero {
    margin: 12px 0 16px 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
  }
  
  body.cbd-nordic-theme.cbd-module-page .v4-hero-card {
    padding: 24px 20px !important;
  }
  
  body.cbd-nordic-theme.cbd-module-page .cb-v3-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 20px 0 30px 0 !important;
  }
  
  body.cbd-nordic-theme.cbd-module-page .cb-v3-toc {
    width: 100% !important;
    position: static !important;
    max-height: none !important;
  }
}

/* 8. Ligament detail cards with horizontal columns and side-by-side images */
body.cbd-nordic-theme.cbd-module-page .tc-card.ligament-card {
  display: flex !important;
  flex-direction: column !important;
  padding: 24px !important;
  margin: 20px 0 !important;
}

body.cbd-nordic-theme.cbd-module-page .tc-card.ligament-card .ligament-card-body {
  display: flex !important;
  flex-direction: row !important;
  gap: 24px !important;
  align-items: stretch !important;
  margin-top: 10px !important;
}

body.cbd-nordic-theme.cbd-module-page .tc-card.ligament-card .tc-card-media {
  flex-shrink: 0 !important;
  width: 200px !important;
  height: 200px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  border: 1px solid var(--glass-border) !important;
  background: rgba(10, 15, 30, 0.4) !important;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  align-self: center !important;
}

body.cbd-nordic-theme.cbd-module-page .tc-card.ligament-card .tc-card-media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

body.cbd-nordic-theme.cbd-module-page .tc-card.ligament-card .tc-card-sections {
  flex: 1 !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 24px !important;
}

body.cbd-nordic-theme.cbd-module-page .tc-card.ligament-card .tc-card-sections .tc-section {
  flex: 1 !important;
  padding: 4px 0 4px 24px !important;
  border-left: 1px dashed var(--glass-border) !important;
  border-top: none !important;
  background: transparent !important;
}

body.cbd-nordic-theme.cbd-module-page .tc-card.ligament-card .tc-card-sections .tc-section:first-child {
  border-left: none !important;
  padding-left: 0 !important;
}

@media (max-width: 991px) {
  body.cbd-nordic-theme.cbd-module-page .tc-card.ligament-card .ligament-card-body {
    flex-direction: column !important;
    gap: 20px !important;
  }
  
  body.cbd-nordic-theme.cbd-module-page .tc-card.ligament-card .tc-card-media {
    width: 180px !important;
    height: 180px !important;
    align-self: center !important;
  }
  
  body.cbd-nordic-theme.cbd-module-page .tc-card.ligament-card .tc-card-sections {
    flex-direction: column !important;
    gap: 16px !important;
  }
  
  body.cbd-nordic-theme.cbd-module-page .tc-card.ligament-card .tc-card-sections .tc-section {
    padding: 12px 0 0 0 !important;
    border-left: none !important;
    border-top: 1px dashed var(--glass-border) !important;
  }
  
  body.cbd-nordic-theme.cbd-module-page .tc-card.ligament-card .tc-card-sections .tc-section:first-child {
    border-top: none !important;
    padding-top: 0 !important;
  }
}

/* Knee Osteology & Myology Text Highlighting Targets Overrides */
body.cbd-nordic-theme.cbd-module-page #v4-anat-femur .v4-hot,
body.cbd-nordic-theme.cbd-module-page #v4-anat-tibia .v4-hot,
body.cbd-nordic-theme.cbd-module-page #v4-anat-extensor .v4-hot,
body.cbd-nordic-theme.cbd-module-page #v4-anat-flexor .v4-hot {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 4px !important;
  color: transparent !important;
  width: var(--lbl-w, 80px) !important;
  height: 22px !important;
  transform: translate(-50%, -50%) !important;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

body.cbd-nordic-theme.cbd-module-page #v4-anat-femur .v4-hot:hover,
body.cbd-nordic-theme.cbd-module-page #v4-anat-femur .v4-hot.hovered,
body.cbd-nordic-theme.cbd-module-page #v4-anat-tibia .v4-hot:hover,
body.cbd-nordic-theme.cbd-module-page #v4-anat-tibia .v4-hot.hovered,
body.cbd-nordic-theme.cbd-module-page #v4-anat-extensor .v4-hot:hover,
body.cbd-nordic-theme.cbd-module-page #v4-anat-extensor .v4-hot.hovered,
body.cbd-nordic-theme.cbd-module-page #v4-anat-flexor .v4-hot:hover,
body.cbd-nordic-theme.cbd-module-page #v4-anat-flexor .v4-hot.hovered {
  background: rgba(91, 164, 255, 0.15) !important;
  box-shadow: 0 0 0 1.5px rgba(91, 164, 255, 0.5) !important;
  transform: translate(-50%, -50%) scale(1) !important;
}

body.cbd-nordic-theme.cbd-module-page #v4-anat-femur .v4-hot.active,
body.cbd-nordic-theme.cbd-module-page #v4-anat-tibia .v4-hot.active,
body.cbd-nordic-theme.cbd-module-page #v4-anat-extensor .v4-hot.active,
body.cbd-nordic-theme.cbd-module-page #v4-anat-flexor .v4-hot.active {
  background: rgba(91, 164, 255, 0.25) !important;
  box-shadow: 0 0 0 1.5px rgba(91, 164, 255, 0.85), 0 0 16px rgba(91, 164, 255, 0.55) !important;
  transform: translate(-50%, -50%) scale(1) !important;
  animation: none !important;
}

/* Hide circular number indicators in sidebar chips for clean text-only layout */
body.cbd-nordic-theme.cbd-module-page #v4-anat-femur .v4-chip-n,
body.cbd-nordic-theme.cbd-module-page #v4-anat-tibia .v4-chip-n,
body.cbd-nordic-theme.cbd-module-page #v4-anat-extensor .v4-chip-n,
body.cbd-nordic-theme.cbd-module-page #v4-anat-flexor .v4-chip-n,
body.cbd-nordic-theme.cbd-module-page #v4-anat-nerves .v4-chip-n {
  display: none !important;
}

/* Styling for text badge hotspots on diagrams (e.g. Peripheral Nerves mapping) */
body.cbd-nordic-theme.cbd-module-page .v4-hot.v4-hot-text {
  background: rgba(15, 23, 42, 0.55) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
  border-radius: 6px !important;
  color: var(--text) !important;
  font-family: 'Manrope', sans-serif !important;
  font-weight: 700 !important;
  font-size: 11.5px !important;
  padding: 5px 9px !important;
  width: var(--lbl-w, auto) !important;
  height: auto !important;
  white-space: nowrap !important;
  transform: translate(-50%, -50%) !important;
  cursor: pointer;
  backdrop-filter: var(--glass-filter-ambient) !important;
  -webkit-backdrop-filter: var(--glass-filter-ambient) !important;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease, color 0.12s ease;
}

body.cbd-nordic-theme.cbd-module-page .v4-hot.v4-hot-text:hover,
body.cbd-nordic-theme.cbd-module-page .v4-hot.v4-hot-text.hovered {
  background: rgba(91, 164, 255, 0.15) !important;
  border-color: rgba(91, 164, 255, 0.5) !important;
  box-shadow: 0 0 12px rgba(91, 164, 255, 0.25) !important;
  color: #fff !important;
  transform: translate(-50%, -50%) scale(1.03) !important;
}

body.cbd-nordic-theme.cbd-module-page .v4-hot.v4-hot-text.active {
  background: rgba(91, 164, 255, 0.25) !important;
  border-color: rgba(91, 164, 255, 0.85) !important;
  box-shadow: 0 0 16px rgba(91, 164, 255, 0.55) !important;
  color: #fff !important;
  transform: translate(-50%, -50%) scale(1.03) !important;
  animation: none !important;
}
