/* ==========================================================================
   Font Display Swap Overrides for DocFX Icon Fonts
   ========================================================================== */
@font-face {
  font-family: "bootstrap-icons";
  font-display: swap;
  src: url("./bootstrap-icons-CVBWLLHT.woff2?24e3eb84d0bcaf83d77f904c78ac1f47") format("woff2"),
       url("./bootstrap-icons-VQNJTM6Q.woff?24e3eb84d0bcaf83d77f904c78ac1f47") format("woff");
}

/* ==========================================================================
   Accessibility Enhancements (WCAG 2.1 / 2.2 AA)
   ========================================================================== */

/* Bypass Blocks Skip Link (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 99999;
  padding: 10px 16px;
  background: #111827;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 1.3rem;
  border-radius: 6px;
  border: 2px solid #3b82f6;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: top 0.15s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 16px;
  outline: 2px solid #3b82f6 !important;
  outline-offset: 2px;
}

/* Enhanced Focus Appearance (WCAG 2.4.7 Focus Visible) */
:focus-visible {
  outline: 2px solid #3b82f6 !important;
  outline-offset: 2px !important;
}

[data-bs-theme="dark"] :focus-visible {
  outline-color: #60a5fa !important;
}

/* Screen Reader & Assistive Technology Only (WCAG 2.1 / 2.2 AA) */
.sr-only,
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: normal !important;
  border: 0 !important;
}

.sr-only-focusable:focus,
.visually-hidden-focusable:focus {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
}

/* Affix is hidden by default on all small & medium screen sizes (< 1640px) */
body > main .affix,
.affix {
  display: none !important;
}

/* Affix / Right Rail styling on large screens (>= 1640px) */
@media (min-width: 1640px) {

  /* Provide space for affix rail inside content/post wrapper */
  body:not(.metadata-disable-affix) .post-full-content,
  body:not(.metadata-disable-affix) .post-content,
  body:not(.metadata-disable-affix) .gh-content {
    position: relative;
  }

  /* Affix Table of Contents Sidebar (Large screens >= 1640px) */
  body > main .affix,
  .affix {
    display: block !important;
    position: fixed !important;
    top: 130px !important;
    right: 36px !important;
    width: 240px !important;
    max-height: calc(100vh - 170px) !important;
    overflow-y: auto !important;
    border-left: 1px solid rgba(0, 0, 0, 0.08) !important;
    padding-left: 16px !important;
    z-index: 10 !important;
    scrollbar-width: thin !important;
  }

  .affix h5,
  .affix h2,
  .affix .affix-heading,
  .affix .border-bottom {
    font-size: 1.15rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    font-weight: 700 !important;
    color: #64748b !important;
    margin: 0 0 12px 0 !important;
    padding-bottom: 6px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    line-height: 1.2 !important;
  }

  .affix nav {
    display: flex !important;
    flex-direction: column !important;
  }

  .affix ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .affix li {
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
  }

  .affix li li {
    margin-left: 12px !important;
    margin-top: 4px !important;
  }

  .affix li li a {
    font-size: 1.2rem !important;
    color: #64748b !important;
  }

  .affix a,
  .affix a.link-secondary,
  .affix a.link-body-emphasis {
    font-size: 1.3rem !important;
    line-height: 1.45 !important;
    font-weight: 450 !important;
    color: #475569 !important;
    text-decoration: none !important;
    display: block !important;
    padding: 3px 0 !important;
    margin: 0 !important;
    border: none !important;
    transition: color 0.15s ease !important;
    word-break: break-word !important;
  }

  .affix a:hover,
  .affix a.link-secondary:hover,
  .affix a.link-body-emphasis:hover {
    color: #0f172a !important;
    text-decoration: none !important;
  }

  .affix .active > a,
  .affix a.active,
  .affix li.active > a {
    color: #2563eb !important;
    font-weight: 600 !important;
  }

  /* Dark mode Affix enhancements */
  [data-bs-theme="dark"] .affix {
    border-left-color: rgba(255, 255, 255, 0.1) !important;
  }

  [data-bs-theme="dark"] .affix h5,
  [data-bs-theme="dark"] .affix h2,
  [data-bs-theme="dark"] .affix .affix-heading,
  [data-bs-theme="dark"] .affix .border-bottom {
    color: #94a3b8 !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  }

  [data-bs-theme="dark"] .affix a,
  [data-bs-theme="dark"] .affix a.link-secondary,
  [data-bs-theme="dark"] .affix a.link-body-emphasis {
    color: #94a3b8 !important;
  }

  [data-bs-theme="dark"] .affix li li a {
    color: #64748b !important;
  }

  [data-bs-theme="dark"] .affix a:hover,
  [data-bs-theme="dark"] .affix a.link-secondary:hover,
  [data-bs-theme="dark"] .affix a.link-body-emphasis:hover {
    color: #f8fafc !important;
  }

  [data-bs-theme="dark"] .affix .active > a,
  [data-bs-theme="dark"] .affix a.active,
  [data-bs-theme="dark"] .affix li.active > a {
    color: #60a5fa !important;
  }
}

/* Floating Header Search styling */
.floating-header-search {
  flex: 1 1 auto;
  max-width: 280px;
  margin: 0 30px;
  position: relative;
}

.floating-header-search input {
  width: 100%;
  padding: 6px 12px;
  border-radius: var(--bs-border-radius);
  border: 1px solid var(--color-border, #e5e7eb);
  background-color: var(--color-bg-secondary, #f9fafb);
  color: var(--color-text-primary, #111827);
  outline: none;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.floating-header-search input:focus {
  border-color: var(--color-brand, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Responsive Video Embeds (Aspect-Ratio) */
.kg-embed-card iframe,
.post-content iframe[src*="youtube.com"],
.post-content iframe[src*="vimeo.com"],
.post-content iframe[src*="youtube-nocookie.com"],
.post-full-content iframe {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
  border: 0;
}

/* Google AdSense Layout & CLS Prevention */
.ads-banner {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 1040px !important;
  margin: 2vw auto !important;
  min-height: 280px !important;
  contain-intrinsic-size: 1000px 280px !important;
  content-visibility: auto !important;
  text-align: center !important;
  overflow: hidden !important;
}

.ads-banner ins.adsbygoogle {
  display: block !important;
  min-height: 250px !important;
  width: 100% !important;
}

/* ==========================================================================
   Search Command Bar & Navigation Trigger
   ========================================================================== */

.site-nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  max-width: 380px;
  margin: 0 15px;
}

.site-nav-search-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  color: #fff;
  font-size: 1.3rem;
  line-height: 1.4;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.site-nav-search-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.site-nav-search-btn svg {
  flex-shrink: 0;
  margin-right: 8px;
  opacity: 0.85;
}

.site-nav-search-btn .search-btn-placeholder {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.8;
}

.site-nav-voice-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: all 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
  outline: none;
}

.speech-supported .site-nav-voice-btn {
  display: inline-flex;
}

.site-nav-voice-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

@media (max-width: 991px), (max-height: 550px) {
  .site-nav {
    position: relative !important;
  }

  .site-nav .site-nav-center {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    z-index: 10 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    gap: 0 !important;
  }

  .site-nav-search-btn {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    justify-content: center !important;
    border-radius: 50% !important;
  }

  .site-nav-search-btn svg {
    margin-right: 0 !important;
  }

  .site-nav-search-btn .search-btn-placeholder {
    display: none !important;
  }

  .site-nav-voice-btn,
  .speech-supported .site-nav-voice-btn {
    display: none !important;
  }
}

/* Floating Header Search, Share, QR & Markdown Buttons */
.floating-header-search-btn,
.floating-header-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  color: #374151;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
  margin: 0 3px;
  padding: 0;
  flex-shrink: 0;
}

[data-bs-theme="dark"] .floating-header-search-btn,
[data-bs-theme="dark"] .floating-header-share-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #f3f4f6;
}

.floating-header-search-btn:hover,
.floating-header-share-btn:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #111827;
  transform: scale(1.08);
}

[data-bs-theme="dark"] .floating-header-search-btn:hover,
[data-bs-theme="dark"] .floating-header-share-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: scale(1.08);
}

.floating-header-search-btn svg,
.floating-header-share-btn svg,
.floating-header-share-label svg {
  fill: none !important;
  stroke: currentColor !important;
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0;
}

.floating-header-search-btn {
  margin-left: 4px;
  margin-right: 8px;
}

.floating-copy-markdown.copied {
  color: #10b981 !important;
}

/* ==========================================================================
   Search Command Palette Dialog (Lightbox-Equivalent Aesthetic)
   ========================================================================== */

.search-palette-dialog {
  border: none !important;
  border-radius: 14px !important;
  padding: 0 !important;
  background: transparent !important;
  color: inherit !important;
  max-width: 680px !important;
  width: 92vw !important;
  max-height: 85vh !important;
  overflow: visible !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75) !important;
}

.search-palette-dialog::backdrop {
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  transition: opacity 0.2s ease-out !important;
}

.search-palette-content {
  position: relative !important;
  width: 100% !important;
  max-width: 680px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
}

.search-palette-container {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #1f2937;
  max-height: 82vh;
}

[data-bs-theme="dark"] .search-palette-container {
  background: #181d20;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e5e7eb;
}

.search-palette-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  gap: 10px;
  background: #fafafa;
}

[data-bs-theme="dark"] .search-palette-header {
  background: #15191b;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.search-palette-icon {
  display: flex;
  align-items: center;
  color: #6b7280;
  flex-shrink: 0;
}

[data-bs-theme="dark"] .search-palette-icon {
  color: #9ca3af;
}

.search-palette-input {
  flex: 1;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-size: 1.55rem;
  color: inherit;
  outline: none;
  padding: 6px 10px;
  width: 100%;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  line-height: 1.4;
  transition: all 0.15s ease;
}

.search-palette-input:focus {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .search-palette-input:focus {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.search-palette-input::placeholder {
  color: #9ca3af;
  opacity: 0.8;
}

.search-palette-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #4b5563;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease;
  line-height: 1;
}

.search-palette-action-btn:hover {
  background: #e5e7eb;
  color: #111827;
  border-color: #9ca3af;
}

[data-bs-theme="dark"] .search-palette-action-btn {
  color: #d1d5db;
  background: #252c30;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .search-palette-action-btn:hover {
  background: #2f383e;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.search-palette-clear {
  display: inline-flex;
}

.search-palette-voice {
  display: none;
}

.speech-supported .search-palette-voice {
  display: inline-flex;
}

.search-palette-voice.is-listening {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: #ef4444 !important;
  animation: pulse-voice 1.5s infinite ease-in-out;
}

.site-nav-voice-btn.is-listening {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.15) !important;
  animation: pulse-voice 1.5s infinite ease-in-out;
}

@keyframes pulse-voice {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    transform: scale(1.08);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    transform: scale(1);
  }
}

/* Palette Body & Results */
.search-palette-body {
  overflow-y: auto;
  max-height: calc(82vh - 120px);
  padding: 12px;
  width: 100% !important;
  box-sizing: border-box !important;
}

.search-palette-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin: 6px 8px 10px;
}

[data-bs-theme="dark"] .search-palette-section-title {
  color: #9ca3af;
}

.search-palette-quick-actions {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  gap: 4px;
}

.search-palette-quick-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  font-size: 1.4rem;
  transition: background 0.15s ease;
}

.search-palette-quick-item:hover {
  background: #f3f4f6;
  text-decoration: none;
}

[data-bs-theme="dark"] .search-palette-quick-item:hover {
  background: #252c30;
}

.search-palette-results {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  box-sizing: border-box !important;
  gap: 6px;
}

.search-palette-result-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  width: 100% !important;
  box-sizing: border-box !important;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  color: inherit;
}

.search-palette-result-item,
.search-palette-result-item:hover,
.search-palette-result-item:focus,
.search-palette-result-item:active,
.search-palette-result-item.is-selected,
.search-palette-result-item *,
.search-palette-result-item:hover *,
.search-palette-result-item.is-selected * {
  text-decoration: none !important;
}

.search-palette-result-item:hover,
.search-palette-result-item.is-selected {
  background: #eff6ff;
}

[data-bs-theme="dark"] .search-palette-result-item:hover,
[data-bs-theme="dark"] .search-palette-result-item.is-selected {
  background: #1e2836;
}

.search-result-icon {
  margin-top: 3px;
  color: #3b82f6;
  flex-shrink: 0;
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-size: 1.45rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.35;
  margin-bottom: 3px;
}

[data-bs-theme="dark"] .search-result-title {
  color: #f3f4f6;
}

.search-result-excerpt {
  font-size: 1.25rem;
  color: #4b5563;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

[data-bs-theme="dark"] .search-result-excerpt {
  color: #9ca3af;
}

.search-highlight {
  background: rgba(251, 191, 36, 0.4);
  color: inherit;
  padding: 1px 3px;
  border-radius: 3px;
  font-weight: 600;
}

[data-bs-theme="dark"] .search-highlight {
  background: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.search-result-enter-hint {
  opacity: 0;
  transform: translateX(4px);
  transition: all 0.15s ease;
  margin-top: 2px;
}

.search-palette-result-item:hover .search-result-enter-hint,
.search-palette-result-item.is-selected .search-result-enter-hint {
  opacity: 1;
  transform: translateX(0);
}

.search-result-enter-hint kbd {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 22px !important;
  min-width: 22px !important;
  padding: 0 6px !important;
  font-family: inherit !important;
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  color: #374151 !important;
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 5px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06) !important;
  transition: all 0.15s ease !important;
}

[data-bs-theme="dark"] .search-result-enter-hint kbd {
  color: #d1d5db !important;
  background: #252c30 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.search-palette-empty,
.search-palette-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: #6b7280;
  gap: 8px;
}

.search-palette-empty-icon {
  font-size: 2.8rem;
  margin-bottom: 4px;
}

.search-palette-empty-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: inherit;
}

.search-palette-empty-text {
  font-size: 1.3rem;
  color: #9ca3af;
}

.search-palette-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: search-spin 0.7s linear infinite;
  margin-bottom: 8px;
}

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

.search-palette-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #f9fafb;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 1.25rem;
  color: #6b7280;
}

[data-bs-theme="dark"] .search-palette-footer {
  background: #181c20;
  border-top-color: rgba(255, 255, 255, 0.08);
  color: #9ca3af;
}

.search-palette-footer-shortcuts {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.shortcut-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: default;
  color: #6b7280;
  font-size: 1.25rem;
}

.shortcut-item kbd {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 22px !important;
  min-width: 22px !important;
  padding: 0 6px !important;
  font-family: inherit !important;
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  color: #374151 !important;
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 5px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06) !important;
  transition: all 0.15s ease !important;
}

.shortcut-item span {
  font-size: 1.25rem;
  color: #6b7280;
}

[data-bs-theme="dark"] .shortcut-item {
  color: #9ca3af;
}

[data-bs-theme="dark"] .shortcut-item kbd {
  color: #d1d5db !important;
  background: #252c30 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

[data-bs-theme="dark"] .shortcut-item span {
  color: #9ca3af;
}

.search-palette-stats {
  font-size: 1.25rem;
  color: #6b7280;
  font-weight: 500;
}

[data-bs-theme="dark"] .search-palette-stats {
  color: #9ca3af;
}

/* ==========================================================================
   Post Meta (Publication Date & Tags) & Header Spacing Tightening
   ========================================================================== */

.post-full-header {
  padding: 3vw 3vw 1.5vw !important;
}

@media (max-width: 500px) {
  .post-full-header {
    padding: 5vw 3vw 2vw !important;
  }
}

.post-full-meta {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  color: #738a94 !important;
  font-size: 1.2rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.5px !important;
  line-height: 1.15em !important;
  margin: 0 0 24px 0 !important;
  text-transform: none !important;
}

.post-full-meta-date {
  font-family: inherit !important;
  color: inherit !important;
  font-weight: 500 !important;
  font-size: 1.2rem !important;
  letter-spacing: 0.5px !important;
  line-height: 1.15em !important;
  text-transform: none !important;
}

.post-full-meta .date-divider {
  display: inline-block !important;
  margin: 0 2px !important;
  color: #738a94 !important;
  opacity: 0.75 !important;
}

.post-full-meta-tags {
  font-family: inherit !important;
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 3px !important;
  color: #738a94 !important;
  font-size: 1.2rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.5px !important;
  line-height: 1.15em !important;
  text-transform: uppercase !important;
}

/* Identical font styles of post-card-tags for tags anchor + kill Casper post-full-content a box-shadow */
.post-full-content .post-full-meta a,
.post-full-meta a,
.post-full-meta-tags a,
.post-full-meta-tags a.post-card-tags {
  font-family: inherit !important;
  display: inline !important;
  color: #738a94 !important;
  font-size: 1.2rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.5px !important;
  line-height: 1.15em !important;
  margin: 0 !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  box-shadow: none !important;
  border: none !important;
  transition: color 0.15s ease !important;
}

.post-full-content .post-full-meta a:hover,
.post-full-meta a:hover,
.post-full-meta-tags a:hover,
.post-full-meta-tags a.post-card-tags:hover {
  color: #3eb0ef !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.post-full-meta-tags a:not(:last-child)::after {
  content: "," !important;
  margin-right: 4px !important;
  color: #738a94 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

/* Squeeze spacing in post-full-content (reduced padding-top) */
.post-full-content {
  padding: 24px 100px 0 !important;
}

@media (max-width: 1170px) {
  .post-full-content {
    padding: 24px 7vw 0 !important;
  }
}

@media (max-width: 500px) {
  .post-full-content {
    padding: 16px 4vw 0 !important;
  }
}

/* Dark mode theme overrides for post meta */
[data-bs-theme="dark"] .post-full-meta,
[data-bs-theme="dark"] .post-full-meta-date,
[data-bs-theme="dark"] .post-full-meta-tags,
[data-bs-theme="dark"] .post-full-meta .date-divider,
[data-bs-theme="dark"] .post-full-content .post-full-meta a,
[data-bs-theme="dark"] .post-full-meta a,
[data-bs-theme="dark"] .post-full-meta-tags a,
[data-bs-theme="dark"] .post-full-meta-tags a.post-card-tags {
  color: #9ca3af !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

[data-bs-theme="dark"] .post-full-content .post-full-meta a:hover,
[data-bs-theme="dark"] .post-full-meta a:hover,
[data-bs-theme="dark"] .post-full-meta-tags a:hover,
[data-bs-theme="dark"] .post-full-meta-tags a.post-card-tags:hover {
  color: #60a5fa !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

[data-bs-theme="dark"] .post-full-meta-tags a:not(:last-child)::after {
  color: #9ca3af !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

/* ==========================================================================
   Article-Level Markdown Actions Toolbar & Viewer Modal
   ========================================================================== */

/* Markdown actions toolbar: desktop only (hidden on mobile and tablets) */
.markdown-action-bar {
  margin: 16px auto 6px;
  display: none !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  text-align: center !important;
}

.floating-copy-markdown {
  display: none !important;
}

@media (min-width: 1040px) {
  .markdown-action-bar {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .floating-copy-markdown {
    display: inline-flex !important;
  }
}

.markdown-action-group {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 auto;
}

/* Light theme / High-Contrast Pill Buttons */
.markdown-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 1.3rem;
  font-weight: 600;
  color: #1f2937;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.35;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
}

.markdown-action-btn svg {
  flex-shrink: 0;
}

.markdown-action-btn:hover {
  color: #2563eb;
  background: #f8fafc;
  border-color: #3b82f6;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}

.markdown-action-btn.btn-github-source {
  color: #111827;
}

.markdown-action-btn.btn-github-source:hover {
  color: #000;
  border-color: #111827;
}

.markdown-action-btn.copied {
  color: #065f46 !important;
  border-color: #059669 !important;
  background: #ecfdf5 !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25) !important;
}

/* Dark Theme High-Contrast Styling */
[data-bs-theme="dark"] .markdown-action-btn {
  color: #f9fafb;
  background: #1e2428;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .markdown-action-btn:hover {
  color: #60a5fa;
  background: #283136;
  border-color: #60a5fa;
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.28);
}

[data-bs-theme="dark"] .markdown-action-btn.btn-github-source {
  color: #f9fafb;
}

[data-bs-theme="dark"] .markdown-action-btn.btn-github-source:hover {
  color: #ffffff;
  border-color: #ffffff;
}

[data-bs-theme="dark"] .markdown-action-btn.copied {
  color: #6ee7b7 !important;
  border-color: #10b981 !important;
  background: rgba(6, 78, 59, 0.65) !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
}

/* ==========================================================================
   DocFX Tab Groups Styling (Traditional Tabbed Layout with Button Typography)
   ========================================================================== */

.tabGroup {
  margin: 2.2rem 0 2rem 0 !important;
  position: relative !important;
}

/* Tab list bar container */
.post-full-content .tabGroup ul[role="tablist"],
.tabGroup ul[role="tablist"],
.tabGroup [role="tablist"],
[role="tablist"].nav,
[role="tablist"].nav-tabs {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  gap: 0 !important;
  list-style: none !important;
  margin: 0 0 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

.post-full-content .tabGroup ul[role="tablist"] li,
.tabGroup ul[role="tablist"] li,
.tabGroup [role="tablist"] li,
[role="tablist"] li,
.tabGroup [role="presentation"] {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
}

/* Tab link base styling */
.post-full-content .tabGroup a[role="tab"],
.post-full-content .tabGroup button[role="tab"],
.post-full-content .tabGroup [role="tab"],
.post-full-content .tabGroup a[data-tab],
.tabGroup a[role="tab"],
.tabGroup button[role="tab"],
.tabGroup [role="tab"],
.tabGroup a[data-tab],
[role="tablist"] a,
[role="tablist"] button,
[role="tablist"] [role="tab"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px 18px !important;
  margin: 0 4px -2px 0 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif !important;
  font-size: 1.3rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  line-height: 1.35 !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: color 0.15s ease, border-color 0.15s ease !important;
  outline: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  word-break: normal !important;
  white-space: nowrap !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;

  /* Inactive State (Light Theme) */
  color: #64748b !important;
}

/* Inactive Tab Hover (Light Theme) */
.post-full-content .tabGroup a[role="tab"]:not([aria-selected="true"]):hover,
.post-full-content .tabGroup button[role="tab"]:not([aria-selected="true"]):hover,
.tabGroup a[role="tab"]:not([aria-selected="true"]):hover,
.tabGroup button[role="tab"]:not([aria-selected="true"]):hover,
.tabGroup [role="tab"]:not([aria-selected="true"]):hover,
.tabGroup a[data-tab]:not([aria-selected="true"]):hover,
[role="tablist"] a:not([aria-selected="true"]):not(.active):hover,
[role="tablist"] button:not([aria-selected="true"]):not(.active):hover {
  color: #2563eb !important;
  background: transparent !important;
  border-bottom: 2px solid #93c5fd !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Active Tab State (Light Theme) */
.post-full-content .tabGroup a[role="tab"][aria-selected="true"],
.post-full-content .tabGroup button[role="tab"][aria-selected="true"],
.tabGroup a[role="tab"][aria-selected="true"],
.tabGroup button[role="tab"][aria-selected="true"],
.tabGroup [role="tab"][aria-selected="true"],
.tabGroup a[role="tab"].active,
.tabGroup button[role="tab"].active,
[role="tablist"] a[aria-selected="true"],
[role="tablist"] button[aria-selected="true"],
[role="tablist"] .active > a,
[role="tablist"] a.active {
  color: #2563eb !important;
  font-weight: 700 !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid #2563eb !important;
  box-shadow: none !important;
  text-decoration: none !important;
  transform: none !important;
  cursor: default !important;
}

/* --- Dark Theme Traditional Tabs --- */
[data-bs-theme="dark"] .post-full-content .tabGroup ul[role="tablist"],
[data-bs-theme="dark"] .tabGroup ul[role="tablist"],
[data-bs-theme="dark"] [role="tablist"],
html[data-bs-theme="dark"] .tabGroup ul[role="tablist"] {
  border-bottom: 2px solid #30363d !important;
}

[data-bs-theme="dark"] .post-full-content .tabGroup a[role="tab"],
[data-bs-theme="dark"] .tabGroup a[role="tab"],
[data-bs-theme="dark"] .tabGroup button[role="tab"],
[data-bs-theme="dark"] .tabGroup [role="tab"],
[data-bs-theme="dark"] .tabGroup a[data-tab],
[data-bs-theme="dark"] [role="tablist"] a,
[data-bs-theme="dark"] [role="tablist"] button,
[data-bs-theme="dark"] [role="tablist"] [role="tab"],
html[data-bs-theme="dark"] .post-full-content .tabGroup a[role="tab"],
html[data-bs-theme="dark"] .tabGroup a[role="tab"],
html[data-bs-theme="dark"] .tabGroup [role="tab"] {
  color: #8b949e !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Inactive Tab Hover (Dark Theme) */
[data-bs-theme="dark"] .post-full-content .tabGroup a[role="tab"]:not([aria-selected="true"]):hover,
[data-bs-theme="dark"] .tabGroup a[role="tab"]:not([aria-selected="true"]):hover,
[data-bs-theme="dark"] .tabGroup button[role="tab"]:not([aria-selected="true"]):hover,
[data-bs-theme="dark"] .tabGroup [role="tab"]:not([aria-selected="true"]):hover,
[data-bs-theme="dark"] .tabGroup a[data-tab]:not([aria-selected="true"]):hover,
[data-bs-theme="dark"] [role="tablist"] a:not([aria-selected="true"]):not(.active):hover,
[data-bs-theme="dark"] [role="tablist"] button:not([aria-selected="true"]):not(.active):hover,
html[data-bs-theme="dark"] .post-full-content .tabGroup a[role="tab"]:not([aria-selected="true"]):hover,
html[data-bs-theme="dark"] .tabGroup a[role="tab"]:not([aria-selected="true"]):hover {
  color: #58a6ff !important;
  background: transparent !important;
  border-bottom: 2px solid rgba(88, 166, 255, 0.45) !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Active Tab State (Dark Theme) */
[data-bs-theme="dark"] .post-full-content .tabGroup a[role="tab"][aria-selected="true"],
[data-bs-theme="dark"] .tabGroup a[role="tab"][aria-selected="true"],
[data-bs-theme="dark"] .tabGroup button[role="tab"][aria-selected="true"],
[data-bs-theme="dark"] .tabGroup [role="tab"][aria-selected="true"],
[data-bs-theme="dark"] .tabGroup a[role="tab"].active,
[data-bs-theme="dark"] .tabGroup button[role="tab"].active,
[data-bs-theme="dark"] [role="tablist"] a[aria-selected="true"],
[data-bs-theme="dark"] [role="tablist"] button[aria-selected="true"],
[data-bs-theme="dark"] [role="tablist"] .active > a,
[data-bs-theme="dark"] [role="tablist"] a.active,
html[data-bs-theme="dark"] .post-full-content .tabGroup a[role="tab"][aria-selected="true"],
html[data-bs-theme="dark"] .tabGroup a[role="tab"][aria-selected="true"] {
  color: #58a6ff !important;
  font-weight: 700 !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid #58a6ff !important;
  box-shadow: none !important;
  text-decoration: none !important;
  transform: none !important;
  cursor: default !important;
}

/* Tab Panels & Inner Content */
.tabGroup section[role="tabpanel"],
.tabGroup [role="tabpanel"] {
  margin-top: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.tabGroup section[role="tabpanel"][aria-hidden="true"],
.tabGroup section[role="tabpanel"][hidden],
.tabGroup [role="tabpanel"][aria-hidden="true"],
.tabGroup [role="tabpanel"][hidden] {
  display: none !important;
}

.tabGroup section[role="tabpanel"]:not([aria-hidden="true"]):not([hidden]),
.tabGroup [role="tabpanel"]:not([aria-hidden="true"]):not([hidden]) {
  display: block !important;
}

.tabGroup section[role="tabpanel"] > .code-block-wrapper,
.tabGroup section[role="tabpanel"] > pre,
.tabGroup [role="tabpanel"] > .code-block-wrapper,
.tabGroup [role="tabpanel"] > pre {
  margin-top: 0 !important;
}

/* Markdown Viewer Dialog Modal */
.markdown-viewer-dialog {
  border: none !important;
  border-radius: 14px !important;
  padding: 0 !important;
  background: transparent !important;
  color: inherit !important;
  max-width: 95vw !important;
  width: 95vw !important;
  max-height: 95vh !important;
  height: 95vh !important;
  overflow: visible !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75) !important;
  text-align: left !important;
}

.markdown-viewer-dialog::backdrop {
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

.markdown-viewer-content {
  position: relative !important;
  width: 100% !important;
  max-width: 95vw !important;
  height: 100% !important;
  max-height: 95vh !important;
  display: flex !important;
  flex-direction: column !important;
  text-align: left !important;
}

.markdown-viewer-container {
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #1f2937;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 95vh !important;
  text-align: left !important;
}

[data-bs-theme="dark"] .markdown-viewer-container {
  background: #181d20;
  border-color: rgba(255, 255, 255, 0.12);
  color: #e5e7eb;
}

.markdown-viewer-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  gap: 16px;
  text-align: left !important;
  flex-shrink: 0 !important;
}

[data-bs-theme="dark"] .markdown-viewer-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.markdown-viewer-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: left !important;
}

.markdown-viewer-badge {
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #3b82f6;
  text-align: left !important;
}

.markdown-viewer-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left !important;
}

.markdown-viewer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.markdown-modal-copy-btn,
.markdown-modal-prompt-btn,
.markdown-modal-download-btn,
.markdown-modal-github-btn,
.markdown-modal-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 1.25rem;
  font-weight: 500;
  color: #374151;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.4;
}

.markdown-modal-copy-btn.copied,
.markdown-modal-prompt-btn.copied {
  color: #065f46 !important;
  border-color: #059669 !important;
  background: #ecfdf5 !important;
}

[data-bs-theme="dark"] .markdown-modal-copy-btn,
[data-bs-theme="dark"] .markdown-modal-prompt-btn,
[data-bs-theme="dark"] .markdown-modal-download-btn,
[data-bs-theme="dark"] .markdown-modal-github-btn,
[data-bs-theme="dark"] .markdown-modal-close-btn {
  color: #e5e7eb;
  background: #252c30;
  border-color: rgba(255, 255, 255, 0.12);
}

[data-bs-theme="dark"] .markdown-modal-copy-btn.copied,
[data-bs-theme="dark"] .markdown-modal-prompt-btn.copied {
  color: #6ee7b7 !important;
  border-color: #10b981 !important;
  background: rgba(6, 78, 59, 0.65) !important;
}

.markdown-modal-copy-btn:hover,
.markdown-modal-prompt-btn:hover,
.markdown-modal-download-btn:hover,
.markdown-modal-github-btn:hover,
.markdown-modal-close-btn:hover {
  background: #e5e7eb;
  color: #111827;
  text-decoration: none;
}

[data-bs-theme="dark"] .markdown-modal-copy-btn:hover,
[data-bs-theme="dark"] .markdown-modal-prompt-btn:hover,
[data-bs-theme="dark"] .markdown-modal-download-btn:hover,
[data-bs-theme="dark"] .markdown-modal-github-btn:hover,
[data-bs-theme="dark"] .markdown-modal-close-btn:hover {
  background: #2f383e;
  color: #fff;
}

.markdown-viewer-body {
  padding: 16px 20px !important;
  overflow-y: auto !important;
  flex: 1 1 auto !important;
  max-height: none !important;
  text-align: left !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.markdown-viewer-pre {
  margin: 0 !important;
  padding: 16px 20px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  font-size: 1.35rem !important;
  line-height: 1.6 !important;
  overflow-x: auto !important;
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  word-break: normal !important;
  tab-size: 4 !important;
  text-align: left !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.markdown-viewer-pre code {
  text-align: left !important;
  white-space: pre-wrap !important;
  word-break: normal !important;
  word-wrap: break-word !important;
  font-family: inherit !important;
  display: block !important;
  width: 100% !important;
}

[data-bs-theme="dark"] .markdown-viewer-pre {
  background: #0f1214 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.markdown-viewer-dialog .code-action,
.markdown-viewer-dialog .btn.code-action,
.markdown-viewer-dialog a.code-action,
.markdown-viewer-dialog .code-copy-btn,
.markdown-viewer-dialog .code-block-wrapper > .code-copy-btn,
.markdown-viewer-dialog .action,
.markdown-viewer-dialog a[title="Copy"],
.markdown-viewer-dialog button[title="Copy"],
.markdown-viewer-dialog i.bi-clipboard,
.markdown-viewer-dialog i.bi-check-lg {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ==========================================================================
   Mobile Navigation Dropdown Layering & Elevation
   ========================================================================== */
@media (max-width: 991px) {
  .site-home-header,
  .site-header,
  .site-header-background,
  .site-header-background .inner {
    overflow: visible !important;
  }

  .site-header-content {
    position: relative !important;
    z-index: 1 !important;
  }

  .site-nav {
    overflow: visible !important;
    position: relative !important;
    z-index: 5000 !important;
  }

  .site-nav-left {
    overflow: visible !important;
    position: relative !important;
    z-index: 5001 !important;
  }

  .site-nav-left .nav.site-nav-menu,
  .site-nav .nav.site-nav-menu {
    z-index: 999999 !important;
  }

  .site-nav-left .nav.site-nav-menu.mobile-menu-active,
  .site-nav .nav.site-nav-menu.mobile-menu-active {
    display: flex !important;
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    min-width: 200px !important;
    background: rgba(21, 23, 26, 0.98) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    padding: 8px 10px !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7) !important;
    z-index: 999999 !important;
  }

  [data-bs-theme="dark"] .site-nav-left .nav.site-nav-menu.mobile-menu-active,
  [data-bs-theme="dark"] .site-nav .nav.site-nav-menu.mobile-menu-active {
    background: rgba(15, 18, 20, 0.98) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
  }
}

/* ==========================================================================
   Floating Header Social Sharing Dropdown & Responsive Ordering
   ========================================================================== */

.floating-header-social-group {
  position: relative;
  display: flex;
  align-items: center;
}

.floating-header-social-list {
  display: flex;
  align-items: center;
}

.floating-header-share-label {
  background: transparent;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  color: rgba(0, 0, 0, 0.7);
  font-size: 1.3rem;
  font-weight: 500;
  cursor: default;
}

[data-bs-theme="dark"] .floating-header-share-label {
  color: rgba(255, 255, 255, 0.7);
}

.floating-header-share-label .share-desktop-text {
  display: inline;
}

.floating-header-share-label .share-desktop-icon {
  display: inline-flex;
  align-items: center;
}

.floating-header-share-label .share-desktop-icon svg {
  margin: 0 5px 0 10px;
  width: 18px !important;
  height: 18px !important;
  stroke: rgba(0, 0, 0, 0.7) !important;
  fill: none !important;
  transform: rotate(90deg);
}

[data-bs-theme="dark"] .floating-header-share-label .share-desktop-icon svg {
  stroke: rgba(255, 255, 255, 0.7) !important;
}

.floating-header-share-label .share-mobile-icon {
  display: none;
}

.floating-header-share-item .social-text {
  display: none;
}

.floating-header-share-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  color: #fff;
  line-height: 48px;
  text-align: center;
  transition: all 300ms ease;
}

.floating-header-share-x {
  background: #111827;
}

.floating-header-share-fb {
  background: #1877f2;
}

.floating-header-share-bsky {
  background: #0285ff;
}

.floating-header-share-masto {
  background: #6364ff;
}

.floating-header-share-li {
  background: #0077b5;
}

.floating-header-share-re {
  background: #ff4500;
}

.floating-header-share-email {
  background: #0da75f;
}

@media (max-width: 900px) and (min-width: 769px) {
  .floating-header-share-item {
    width: 40px;
    height: 40px;
    line-height: 38px;
  }
}

/* Mobile Screen Floating Header Dropdown (< 768px) */
@media (max-width: 768px) {
  .floating-header-share-label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    margin: 0 3px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.05) !important;
    border: none !important;
    color: #374151 !important;
    cursor: pointer !important;
    user-select: none;
    -webkit-user-select: none;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
  }

  [data-bs-theme="dark"] .floating-header-share-label {
    background: rgba(255, 255, 255, 0.1) !important;
    border: none !important;
    color: #f3f4f6 !important;
  }

  .floating-header-share-label .share-desktop-text,
  .floating-header-share-label .share-desktop-icon {
    display: none !important;
  }

  .floating-header-share-label .share-mobile-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .floating-header-share-label .share-mobile-icon svg {
    margin: 0 !important;
    width: 16px !important;
    height: 16px !important;
    stroke: currentColor !important;
    fill: none !important;
    transform: none !important;
    transition: transform 0.2s ease !important;
  }

  [data-bs-theme="dark"] .floating-header-share-label .share-mobile-icon svg {
    stroke: currentColor !important;
  }

  .floating-header-share-label:hover,
  .floating-header-social-group.is-open .floating-header-share-label {
    background: rgba(0, 0, 0, 0.12) !important;
    color: #111827 !important;
    border: none !important;
    transform: scale(1.08) !important;
  }

  [data-bs-theme="dark"] .floating-header-share-label:hover,
  [data-bs-theme="dark"] .floating-header-social-group.is-open .floating-header-share-label {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    border: none !important;
    transform: scale(1.08) !important;
  }

  .floating-header-social-group.is-open .floating-header-share-label svg {
    transform: none !important;
  }

  .floating-header-social-list {
    display: none !important;
  }

  .floating-header-social-group.is-open .floating-header-social-list {
    display: flex !important;
    flex-direction: column !important;
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    min-width: 175px !important;
    max-width: 220px !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    padding: 6px !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    z-index: 10001 !important;
    animation: floatingDropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  [data-bs-theme="dark"] .floating-header-social-group.is-open .floating-header-social-list {
    background: #1e2428 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.65) !important;
  }

  .floating-header-share-item {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    height: auto !important;
    padding: 7px 10px !important;
    gap: 10px !important;
    border-radius: 8px !important;
    font-size: 1.25rem !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    text-align: left !important;
    color: #374151 !important;
    background: transparent !important;
    transition: all 0.15s ease !important;
  }

  [data-bs-theme="dark"] .floating-header-share-item {
    color: #e5e7eb !important;
  }

  .floating-header-share-item:hover {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #111827 !important;
  }

  [data-bs-theme="dark"] .floating-header-share-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
  }

  .floating-header-share-item svg {
    width: 16px !important;
    height: 16px !important;
    fill: currentColor !important;
    flex-shrink: 0 !important;
  }

  .floating-header-share-item .social-text {
    display: inline-block !important;
    font-size: 1.25rem !important;
  }
}

@keyframes floatingDropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   QR Code & Share Modal Dialog (Lightbox Aesthetic)
   ========================================================================== */

.qr-dialog {
  border: none !important;
  border-radius: 16px !important;
  padding: 0 !important;
  background: transparent !important;
  color: inherit !important;
  width: min(calc(100vw - 24px), 380px) !important;
  max-width: 380px !important;
  overflow: visible !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75) !important;
  box-sizing: border-box !important;
  margin: auto !important;
}

.qr-dialog::backdrop {
  background: rgba(0, 0, 0, 0.82) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

.qr-dialog-content {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
}

.qr-modal-container {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #1f2937;
  width: 100%;
  box-sizing: border-box;
}

[data-bs-theme="dark"] .qr-modal-container {
  background: #181d20;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f3f4f6;
}

.qr-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: #fafafa;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

[data-bs-theme="dark"] .qr-modal-header {
  background: #13171a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.qr-modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  min-width: 0;
  flex: 1 1 auto;
}

.qr-modal-badge {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #6366f1;
}

[data-bs-theme="dark"] .qr-modal-badge {
  color: #818cf8;
}

.qr-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #111827;
  min-width: 0;
}

[data-bs-theme="dark"] .qr-modal-title {
  color: #f9fafb;
}

.qr-modal-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 1.25rem;
  font-weight: 500;
  color: #374151;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.4;
  flex-shrink: 0;
}

[data-bs-theme="dark"] .qr-modal-close-btn {
  color: #e5e7eb;
  background: #252c30;
  border-color: rgba(255, 255, 255, 0.12);
}

.qr-modal-close-btn:hover {
  background: #e5e7eb;
  color: #111827;
}

[data-bs-theme="dark"] .qr-modal-close-btn:hover {
  background: #2f383e;
  color: #fff;
}

.qr-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  gap: 14px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.qr-code-wrapper {
  padding: 10px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  box-sizing: border-box;
}

.qr-code-graphic {
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  box-sizing: border-box;
}

.qr-code-graphic canvas,
.qr-code-graphic img {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
}

.qr-code-loading {
  font-size: 0.85rem;
  color: #6b7280;
}

.qr-url-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-sizing: border-box;
  min-width: 0;
}

.qr-url-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.06em;
}

[data-bs-theme="dark"] .qr-url-label {
  color: #9ca3af;
}

.qr-url-text {
  padding: 8px 10px;
  font-size: 0.8rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #f3f4f6;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #1f2937;
  word-break: break-all;
  overflow-wrap: anywhere;
  max-height: 52px;
  overflow-y: auto;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

[data-bs-theme="dark"] .qr-url-text {
  background: #111417;
  border-color: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
}

.qr-modal-actions {
  width: 100%;
  display: flex;
  gap: 8px;
  margin-top: 2px;
  box-sizing: border-box;
  min-width: 0;
}

.qr-action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 1.25rem;
  font-weight: 500;
  color: #374151;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.4;
  text-decoration: none;
  box-sizing: border-box;
  min-width: 0;
  white-space: nowrap;
}

[data-bs-theme="dark"] .qr-action-btn {
  color: #e5e7eb;
  background: #252c30;
  border-color: rgba(255, 255, 255, 0.12);
}

.qr-action-btn:hover {
  background: #e5e7eb;
  color: #111827;
  text-decoration: none;
}

[data-bs-theme="dark"] .qr-action-btn:hover {
  background: #2f383e;
  color: #ffffff;
}

.qr-action-btn.copied,
.qr-copy-btn.copied {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
}

@media (max-width: 400px) {
  .qr-dialog {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
  }

  .qr-modal-header {
    padding: 10px 12px;
  }

  .qr-modal-body {
    padding: 12px;
    gap: 12px;
  }

  .qr-code-wrapper {
    padding: 8px;
  }

  .qr-code-graphic {
    width: 160px;
    height: 160px;
  }

  .qr-action-btn {
    padding: 6px 8px;
    font-size: 1.2rem;
    gap: 4px;
  }
}

/* ==========================================================================
   DocFX / Markdown Alert Callout Boxes (NOTE, TIP, IMPORTANT, WARNING, CAUTION)
   ========================================================================== */

.NOTE,
.TIP,
.IMPORTANT,
.WARNING,
.CAUTION,
.ERROR,
.alert,
div[class*="NOTE"],
div[class*="TIP"],
div[class*="IMPORTANT"],
div[class*="WARNING"],
div[class*="CAUTION"] {
  position: relative !important;
  margin: 2.2rem 0 !important;
  padding: 1.4rem 1.8rem !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
  overflow: hidden !important;
  transition: background-color 0.2s ease, border-color 0.2s ease !important;
}

.NOTE h5,
.TIP h5,
.IMPORTANT h5,
.WARNING h5,
.CAUTION h5,
.ERROR h5,
.alert h5,
div[class*="NOTE"] h5,
div[class*="TIP"] h5,
div[class*="IMPORTANT"] h5,
div[class*="WARNING"] h5,
div[class*="CAUTION"] h5 {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  margin: 0 0 0.8rem 0 !important;
  padding: 0 !important;
  border-bottom: none !important;
  line-height: 1.2 !important;
}

.NOTE p,
.TIP p,
.IMPORTANT p,
.WARNING p,
.CAUTION p,
.ERROR p,
.alert p,
div[class*="NOTE"] p,
div[class*="TIP"] p,
div[class*="IMPORTANT"] p,
div[class*="WARNING"] p,
div[class*="CAUTION"] p {
  margin: 0 0 0.8rem 0 !important;
  font-size: 1.5rem !important;
  line-height: 1.65 !important;
}

.NOTE p:last-child,
.TIP p:last-child,
.IMPORTANT p:last-child,
.WARNING p:last-child,
.CAUTION p:last-child,
.ERROR p:last-child,
.alert p:last-child,
div[class*="NOTE"] p:last-child,
div[class*="TIP"] p:last-child,
div[class*="IMPORTANT"] p:last-child,
div[class*="WARNING"] p:last-child,
div[class*="CAUTION"] p:last-child {
  margin-bottom: 0 !important;
}

.NOTE code,
.TIP code,
.IMPORTANT code,
.WARNING code,
.CAUTION code,
.ERROR code,
.alert code {
  font-size: 0.9em !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
}

/* --- 1. NOTE (Info Blue) --- */
.NOTE,
.alert-info,
div[class*="NOTE"] {
  background-color: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  border-left: 4px solid #3b82f6 !important;
  color: #1e3a8a !important;
}

.NOTE h5,
.alert-info h5,
div[class*="NOTE"] h5 {
  color: #1d4ed8 !important;
}

.NOTE h5::before,
.alert-info h5::before,
div[class*="NOTE"] h5::before {
  content: "" !important;
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  background-color: #3b82f6 !important;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 01.67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 11-.671-1.34l.041-.022zM12 9a.75.75 0 100-1.5.75.75 0 000 1.5z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat center center / contain !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 01.67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 11-.671-1.34l.041-.022zM12 9a.75.75 0 100-1.5.75.75 0 000 1.5z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat center center / contain !important;
}

/* --- 2. TIP (Emerald Green) --- */
.TIP,
.alert-success,
div[class*="TIP"] {
  background-color: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  border-left: 4px solid #10b981 !important;
  color: #064e3b !important;
}

.TIP h5,
.alert-success h5,
div[class*="TIP"] h5 {
  color: #047857 !important;
}

.TIP h5::before,
.alert-success h5::before,
div[class*="TIP"] h5::before {
  content: "" !important;
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  background-color: #10b981 !important;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2.25a.75.75 0 01.75.75v2.25a.75.75 0 01-1.5 0V3a.75.75 0 01.75-.75zM7.5 12a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zm1.5 6.75a.75.75 0 01.75-.75h6a.75.75 0 010 1.5h-6a.75.75 0 01-.75-.75zm1.5 2.25a.75.75 0 01.75-.75h3a.75.75 0 010 1.5h-3a.75.75 0 01-.75-.75z'/%3E%3C/svg%3E") no-repeat center center / contain !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2.25a.75.75 0 01.75.75v2.25a.75.75 0 01-1.5 0V3a.75.75 0 01.75-.75zM7.5 12a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zm1.5 6.75a.75.75 0 01.75-.75h6a.75.75 0 010 1.5h-6a.75.75 0 01-.75-.75zm1.5 2.25a.75.75 0 01.75-.75h3a.75.75 0 010 1.5h-3a.75.75 0 01-.75-.75z'/%3E%3C/svg%3E") no-repeat center center / contain !important;
}

/* --- 3. IMPORTANT (Indigo / Purple) --- */
.IMPORTANT,
.alert-primary,
div[class*="IMPORTANT"] {
  background-color: #f5f3ff !important;
  border: 1px solid #ddd6fe !important;
  border-left: 4px solid #8b5cf6 !important;
  color: #4c1d95 !important;
}

.IMPORTANT h5,
.alert-primary h5,
div[class*="IMPORTANT"] h5 {
  color: #6d28d9 !important;
}

.IMPORTANT h5::before,
.alert-primary h5::before,
div[class*="IMPORTANT"] h5::before {
  content: "" !important;
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  background-color: #8b5cf6 !important;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M12 1.5a5.25 5.25 0 00-5.25 5.25v3a3 3 0 00-3 3v6.75a3 3 0 003 3h10.5a3 3 0 003-3v-6.75a3 3 0 00-3-3v-3c0-2.9-2.35-5.25-5.25-5.25zm3.75 8.25v-3a3.75 3.75 0 10-7.5 0v3h7.5z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat center center / contain !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M12 1.5a5.25 5.25 0 00-5.25 5.25v3a3 3 0 00-3 3v6.75a3 3 0 003 3h10.5a3 3 0 003-3v-6.75a3 3 0 00-3-3v-3c0-2.9-2.35-5.25-5.25-5.25zm3.75 8.25v-3a3.75 3.75 0 10-7.5 0v3h7.5z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat center center / contain !important;
}

/* --- 4. WARNING (Amber Orange) --- */
.WARNING,
.alert-warning,
div[class*="WARNING"] {
  background-color: #fffbeb !important;
  border: 1px solid #fde68a !important;
  border-left: 4px solid #f59e0b !important;
  color: #78350f !important;
}

.WARNING h5,
.alert-warning h5,
div[class*="WARNING"] h5 {
  color: #b45309 !important;
}

.WARNING h5::before,
.alert-warning h5::before,
div[class*="WARNING"] h5::before {
  content: "" !important;
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  background-color: #f59e0b !important;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat center center / contain !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat center center / contain !important;
}

/* --- 5. CAUTION & ERROR (Crimson Red) --- */
.CAUTION,
.ERROR,
.alert-danger,
div[class*="CAUTION"],
div[class*="ERROR"] {
  background-color: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  border-left: 4px solid #ef4444 !important;
  color: #7f1d1d !important;
}

.CAUTION h5,
.ERROR h5,
.alert-danger h5,
div[class*="CAUTION"] h5,
div[class*="ERROR"] h5 {
  color: #b91c1c !important;
}

.CAUTION h5::before,
.ERROR h5::before,
.alert-danger h5::before,
div[class*="CAUTION"] h5::before,
div[class*="ERROR"] h5::before {
  content: "" !important;
  display: inline-block !important;
  width: 18px !important;
  height: 18px !important;
  background-color: #ef4444 !important;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25zm-1.72 6.97a.75.75 0 10-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 101.06 1.06L12 13.06l1.72 1.72a.75.75 0 101.06-1.06L13.06 12l1.72-1.72a.75.75 0 10-1.06-1.06L12 10.94l-1.72-1.72z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat center center / contain !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25zm-1.72 6.97a.75.75 0 10-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 101.06 1.06L12 13.06l1.72 1.72a.75.75 0 101.06-1.06L13.06 12l1.72-1.72a.75.75 0 10-1.06-1.06L12 10.94l-1.72-1.72z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat center center / contain !important;
}

/* ==========================================================================
   Dark Theme Alert Callout Enhancements
   ========================================================================== */

html[data-bs-theme="dark"] .NOTE,
html[data-bs-theme="dark"] .alert-info,
html[data-bs-theme="dark"] div[class*="NOTE"],
[data-bs-theme="dark"] .NOTE,
[data-bs-theme="dark"] .alert-info,
[data-bs-theme="dark"] div[class*="NOTE"] {
  background-color: rgba(59, 130, 246, 0.1) !important;
  border: 1px solid rgba(59, 130, 246, 0.25) !important;
  border-left: 4px solid #60a5fa !important;
  color: #e0f2fe !important;
}

html[data-bs-theme="dark"] .NOTE h5,
html[data-bs-theme="dark"] .alert-info h5,
html[data-bs-theme="dark"] div[class*="NOTE"] h5,
[data-bs-theme="dark"] .NOTE h5,
[data-bs-theme="dark"] .alert-info h5,
[data-bs-theme="dark"] div[class*="NOTE"] h5 {
  color: #93c5fd !important;
}

html[data-bs-theme="dark"] .TIP,
html[data-bs-theme="dark"] .alert-success,
html[data-bs-theme="dark"] div[class*="TIP"],
[data-bs-theme="dark"] .TIP,
[data-bs-theme="dark"] .alert-success,
[data-bs-theme="dark"] div[class*="TIP"] {
  background-color: rgba(16, 185, 129, 0.1) !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
  border-left: 4px solid #34d399 !important;
  color: #ecfdf5 !important;
}

html[data-bs-theme="dark"] .TIP h5,
html[data-bs-theme="dark"] .alert-success h5,
html[data-bs-theme="dark"] div[class*="TIP"] h5,
[data-bs-theme="dark"] .TIP h5,
[data-bs-theme="dark"] .alert-success h5,
[data-bs-theme="dark"] div[class*="TIP"] h5 {
  color: #6ee7b7 !important;
}

html[data-bs-theme="dark"] .IMPORTANT,
html[data-bs-theme="dark"] .alert-primary,
html[data-bs-theme="dark"] div[class*="IMPORTANT"],
[data-bs-theme="dark"] .IMPORTANT,
[data-bs-theme="dark"] .alert-primary,
[data-bs-theme="dark"] div[class*="IMPORTANT"] {
  background-color: rgba(139, 92, 246, 0.12) !important;
  border: 1px solid rgba(139, 92, 246, 0.3) !important;
  border-left: 4px solid #a78bfa !important;
  color: #f5f3ff !important;
}

html[data-bs-theme="dark"] .IMPORTANT h5,
html[data-bs-theme="dark"] .alert-primary h5,
html[data-bs-theme="dark"] div[class*="IMPORTANT"] h5,
[data-bs-theme="dark"] .IMPORTANT h5,
[data-bs-theme="dark"] .alert-primary h5,
[data-bs-theme="dark"] div[class*="IMPORTANT"] h5 {
  color: #c4b5fd !important;
}

html[data-bs-theme="dark"] .WARNING,
html[data-bs-theme="dark"] .alert-warning,
html[data-bs-theme="dark"] div[class*="WARNING"],
[data-bs-theme="dark"] .WARNING,
[data-bs-theme="dark"] .alert-warning,
[data-bs-theme="dark"] div[class*="WARNING"] {
  background-color: rgba(245, 158, 11, 0.1) !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
  border-left: 4px solid #fbbf24 !important;
  color: #fffbeb !important;
}

html[data-bs-theme="dark"] .WARNING h5,
html[data-bs-theme="dark"] .alert-warning h5,
html[data-bs-theme="dark"] div[class*="WARNING"] h5,
[data-bs-theme="dark"] .WARNING h5,
[data-bs-theme="dark"] .alert-warning h5,
[data-bs-theme="dark"] div[class*="WARNING"] h5 {
  color: #fcd34d !important;
}

html[data-bs-theme="dark"] .CAUTION,
html[data-bs-theme="dark"] .ERROR,
html[data-bs-theme="dark"] .alert-danger,
html[data-bs-theme="dark"] div[class*="CAUTION"],
html[data-bs-theme="dark"] div[class*="ERROR"],
[data-bs-theme="dark"] .CAUTION,
[data-bs-theme="dark"] .ERROR,
[data-bs-theme="dark"] .alert-danger,
[data-bs-theme="dark"] div[class*="CAUTION"],
[data-bs-theme="dark"] div[class*="ERROR"] {
  background-color: rgba(239, 68, 68, 0.12) !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  border-left: 4px solid #f87171 !important;
  color: #fef2f2 !important;
}

html[data-bs-theme="dark"] .CAUTION h5,
html[data-bs-theme="dark"] .ERROR h5,
html[data-bs-theme="dark"] .alert-danger h5,
html[data-bs-theme="dark"] div[class*="CAUTION"] h5,
html[data-bs-theme="dark"] div[class*="ERROR"] h5,
[data-bs-theme="dark"] .CAUTION h5,
[data-bs-theme="dark"] .ERROR h5,
[data-bs-theme="dark"] .alert-danger h5,
[data-bs-theme="dark"] div[class*="CAUTION"] h5,
[data-bs-theme="dark"] div[class*="ERROR"] h5 {
  color: #fca5a5 !important;
}

/* ==========================================================================
   Content Boundaries & Responsive Images (Fix Image Overflow)
   ========================================================================== */

.post-full-content img:not(.author-profile-image):not(.static-avatar),
.post-content img:not(.author-profile-image):not(.static-avatar),
.gh-content img:not(.author-profile-image):not(.static-avatar),
.conceptual img:not(.author-profile-image):not(.static-avatar),
.post-full-content figure,
.post-full-content figure img,
.kg-image-card,
.kg-image-card img,
.kg-image {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  box-sizing: border-box !important;
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  border-radius: 8px !important;
}

.post-full-content figure,
.post-content figure,
.gh-content figure,
.conceptual figure {
  max-width: 100% !important;
  width: 100% !important;
  margin: 2rem auto !important;
  overflow: hidden !important;
}

.post-full-image {
  width: 100vw !important;
  max-width: 100vw !important;
  border-radius: 0 !important;
}

/* ==========================================================================
   Multi-Image Presentation Directives
   (Ungrouped, Auto-Fit Grid, Scroll-Snap Strip, Expandable Gallery)
   ========================================================================== */

/* 1. Alert container resets for custom image presentation styles */
.GRID, .alert-grid,
.STRIP, .alert-strip,
.GALLERY, .alert-gallery {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.GRID > h5, .alert-grid > h5,
.STRIP > h5, .alert-strip > h5,
.GALLERY > h5, .alert-gallery > h5 {
  display: none !important;
}

/* Reset anchor underlines and link shadows on image cards & multi-image containers */
.post-full-content a:has(> img),
.post-full-content a:has(> picture),
.post-full-content a:has(> figure),
.post-full-content a img,
.grid a, .GRID a, .alert-grid a,
.strip a, .STRIP a, .alert-strip a,
.gallery a, .GALLERY a, .alert-gallery a {
  box-shadow: none !important;
  text-decoration: none !important;
  border: none !important;
  border-bottom: none !important;
  outline: none !important;
  display: block !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

/* 2. Auto-Fit / Auto-Fill Grid (Smart default for same-paragraph images & explicit ::: grid / > [!GRID]) */
article:not(.gallery):not(.strip) > p:has(> img:nth-of-type(2)),
article:not(.gallery):not(.strip) > p:has(> a:nth-of-type(2) > img),
.post-full-content > p:has(> img:nth-of-type(2)),
.post-full-content > p:has(> a:nth-of-type(2) > img),
.grid,
.GRID,
.alert-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)) !important;
  gap: 1.25rem !important;
  align-items: stretch !important;
  margin: 1.8rem 0 !important;
}

/* Crucial: Unwrap paragraph container inside grids so images/anchors become direct grid cells */
.post-full-content .grid > p,
.post-full-content .GRID > p,
.post-full-content .alert-grid > p,
.grid > p,
.GRID > p,
.alert-grid > p {
  display: contents !important;
}

/* Specific 2-image pairing gets a balanced wider column */
article:not(.gallery):not(.strip) > p:has(> img:nth-of-type(2):last-child),
article:not(.gallery):not(.strip) > p:has(> a:nth-of-type(2):last-child > img),
.post-full-content > p:has(> img:nth-of-type(2):last-child),
.post-full-content > p:has(> a:nth-of-type(2):last-child > img),
.grid:has(> img:nth-child(2):last-child),
.GRID:has(> p > img:nth-child(2):last-child),
.alert-grid:has(> p > img:nth-child(2):last-child) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)) !important;
}

/* Images inside grid */
.grid img,
.GRID img,
.alert-grid img,
.post-full-content > p:has(> img:nth-of-type(2)) img,
.post-full-content > p:has(> a:nth-of-type(2) > img) img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  aspect-ratio: 16 / 10 !important;
  object-fit: cover !important;
  margin: 0 !important;
  border-radius: 8px !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.grid img:hover,
.GRID img:hover,
.alert-grid img:hover,
.post-full-content > p:has(> img:nth-of-type(2)) img:hover,
.post-full-content > p:has(> a:nth-of-type(2) > img) img:hover {
  transform: scale(1.015) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

/* 3. Horizontal Scroll-Snap Strip (::: strip / > [!STRIP] / .strip / .STRIP / .alert-strip) */
.strip,
.STRIP,
.alert-strip {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 1.25rem !important;
  overflow-x: auto !important;
  scroll-snap-type: x mandatory !important;
  overscroll-behavior-x: contain !important;
  padding: 0.5rem 0.25rem 1.25rem 0.25rem !important;
  margin: 1.8rem 0 !important;
  scrollbar-width: thin !important;
  -webkit-overflow-scrolling: touch !important;
}

.post-full-content .strip > p,
.post-full-content .STRIP > p,
.post-full-content .alert-strip > p,
.strip > p,
.STRIP > p,
.alert-strip > p {
  display: contents !important;
}

.strip > *,
.STRIP > *,
.alert-strip > *,
.strip p > *,
.STRIP p > *,
.alert-strip p > * {
  flex: 0 0 clamp(160px, 28vw, 240px) !important;
  scroll-snap-align: start !important;
  margin: 0 !important;
}

.strip img,
.STRIP img,
.alert-strip img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  aspect-ratio: 2 / 3 !important;
  object-fit: cover !important;
  margin: 0 !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.strip img:hover,
.STRIP img:hover,
.alert-strip img:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22) !important;
}

/* 4. Real Flexible Masonry Gallery (::: gallery / > [!GALLERY] / .gallery / .GALLERY / .alert-gallery) */
.gallery,
.GALLERY,
.alert-gallery {
  display: block !important;
  column-width: clamp(200px, 30vw, 320px) !important;
  column-gap: 1rem !important;
  margin: 2rem 0 !important;
  width: 100% !important;
}

.post-full-content .gallery > p,
.post-full-content .GALLERY > p,
.post-full-content .alert-gallery > p,
.gallery > p,
.GALLERY > p,
.alert-gallery > p {
  display: contents !important;
}

.gallery > *,
.GALLERY > *,
.alert-gallery > *,
.gallery p > *,
.GALLERY p > *,
.alert-gallery p > * {
  break-inside: avoid !important;
  page-break-inside: avoid !important;
  display: block !important;
  margin-bottom: 1rem !important;
}

.gallery img,
.GALLERY img,
.alert-gallery img {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  display: block !important;
  margin: 0 0 1rem 0 !important;
  border-radius: 8px !important;
  cursor: zoom-in !important;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.2s ease !important;
  will-change: transform;
}

.gallery img:hover,
.GALLERY img:hover,
.alert-gallery img:hover {
  transform: scale(1.02) translateY(-2px) !important;
  filter: brightness(1.03) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18) !important;
}

/* Future CSS Masonry Progressive Enhancement */
@supports (grid-template-rows: masonry) {
  .gallery,
  .GALLERY,
  .alert-gallery {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(clamp(200px, 30vw, 320px), 1fr)) !important;
    grid-template-rows: masonry !important;
    column-count: initial !important;
    gap: 1rem !important;
  }

  .gallery > *,
  .GALLERY > *,
  .alert-gallery > *,
  .gallery p > *,
  .GALLERY p > *,
  .alert-gallery p > * {
    margin-bottom: 0 !important;
  }

  .gallery img,
  .GALLERY img,
  .alert-gallery img {
    margin: 0 !important;
  }
}

/* a11y: Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  .grid img,
  .GRID img,
  .alert-grid img,
  .strip img,
  .STRIP img,
  .alert-strip img,
  .gallery img,
  .GALLERY img,
  .alert-gallery img {
    transition: none !important;
    transform: none !important;
  }
  .grid img:hover,
  .GRID img:hover,
  .alert-grid img:hover,
  .strip img:hover,
  .STRIP img:hover,
  .alert-strip img:hover,
  .gallery img:hover,
  .GALLERY img:hover,
  .alert-gallery img:hover {
    transform: none !important;
  }
}

/* ==========================================================================
   Article Table Styling (Zebra Striping & Light/Dark Theme Accents)
   ========================================================================== */

/* Remove legacy Ghost screen.css linear-gradient and radial-gradient shadows */
.post-full-content table,
.post-content table,
.gh-content table,
.conceptual table,
table,
.post-full-content table td,
.post-full-content table th,
.post-full-content table td:first-child,
.post-full-content table td:last-child,
.post-full-content table th:first-child,
.post-full-content table th:last-child,
table td:first-child,
table td:last-child,
table th:first-child,
table th:last-child {
  background-image: none !important;
}

/* Table Container */
.post-full-content table,
.post-content table,
.gh-content table,
.conceptual table,
table {
  width: 100% !important;
  max-width: 100% !important;
  margin: 2.2rem 0 2.8rem 0 !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif !important;
  font-size: 1.45rem !important;
  line-height: 1.6 !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  display: table !important;
}

/* Table Header (Light Theme) */
.post-full-content table th,
.post-content table th,
.gh-content table th,
.conceptual table th,
table th {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  padding: 12px 18px !important;
  border: 1px solid #e2e8f0 !important;
  border-bottom: 2px solid #cbd5e1 !important;
  text-align: left !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

/* Table Body Cells (Light Theme) */
.post-full-content table td,
.post-content table td,
.gh-content table td,
.conceptual table td,
table td {
  padding: 12px 18px !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
  vertical-align: top !important;
  transition: background-color 0.15s ease !important;
}

/* Alternating Background Colour Accents (Light Theme Zebra Striping) */
.post-full-content table tbody tr:nth-child(odd),
.post-content table tbody tr:nth-child(odd),
.gh-content table tbody tr:nth-child(odd),
.conceptual table tbody tr:nth-child(odd),
table tbody tr:nth-child(odd),
table tr:nth-child(odd) {
  background-color: #ffffff !important;
}

.post-full-content table tbody tr:nth-child(even),
.post-content table tbody tr:nth-child(even),
.gh-content table tbody tr:nth-child(even),
.conceptual table tbody tr:nth-child(even),
table tbody tr:nth-child(even),
table tr:nth-child(even) {
  background-color: #f8fafc !important;
}

/* Row Hover Highlight (Light Theme) */
.post-full-content table tbody tr:hover td,
.post-content table tbody tr:hover td,
.gh-content table tbody tr:hover td,
.conceptual table tbody tr:hover td,
table tbody tr:hover td,
table tr:hover td {
  background-color: #f1f5f9 !important;
}

/* --- Dark Theme Table Styling --- */
[data-bs-theme="dark"] .post-full-content table,
[data-bs-theme="dark"] .post-content table,
[data-bs-theme="dark"] .gh-content table,
[data-bs-theme="dark"] .conceptual table,
[data-bs-theme="dark"] table,
html[data-bs-theme="dark"] table {
  background-color: #0d1117 !important;
  border: 1px solid #30363d !important;
  color: #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

/* Table Header (Dark Theme) */
[data-bs-theme="dark"] .post-full-content table th,
[data-bs-theme="dark"] .post-content table th,
[data-bs-theme="dark"] .gh-content table th,
[data-bs-theme="dark"] .conceptual table th,
[data-bs-theme="dark"] table th,
html[data-bs-theme="dark"] table th {
  background-color: #161b22 !important;
  color: #f0f6fc !important;
  border: 1px solid #30363d !important;
  border-bottom: 2px solid #3b434d !important;
}

/* Table Body Cells (Dark Theme) */
[data-bs-theme="dark"] .post-full-content table td,
[data-bs-theme="dark"] .post-content table td,
[data-bs-theme="dark"] .gh-content table td,
[data-bs-theme="dark"] .conceptual table td,
[data-bs-theme="dark"] table td,
html[data-bs-theme="dark"] table td {
  border: 1px solid #30363d !important;
  color: #cbd5e1 !important;
}

/* Alternating Background Colour Accents (Dark Theme Zebra Striping) */
[data-bs-theme="dark"] .post-full-content table tbody tr:nth-child(odd),
[data-bs-theme="dark"] .post-content table tbody tr:nth-child(odd),
[data-bs-theme="dark"] .gh-content table tbody tr:nth-child(odd),
[data-bs-theme="dark"] .conceptual table tbody tr:nth-child(odd),
[data-bs-theme="dark"] table tbody tr:nth-child(odd),
[data-bs-theme="dark"] table tr:nth-child(odd),
html[data-bs-theme="dark"] table tr:nth-child(odd) {
  background-color: #0d1117 !important;
}

[data-bs-theme="dark"] .post-full-content table tbody tr:nth-child(even),
[data-bs-theme="dark"] .post-content table tbody tr:nth-child(even),
[data-bs-theme="dark"] .gh-content table tbody tr:nth-child(even),
[data-bs-theme="dark"] .conceptual table tbody tr:nth-child(even),
[data-bs-theme="dark"] table tbody tr:nth-child(even),
[data-bs-theme="dark"] table tr:nth-child(even),
html[data-bs-theme="dark"] table tr:nth-child(even) {
  background-color: #161b22 !important;
}

/* Row Hover Highlight (Dark Theme) */
[data-bs-theme="dark"] .post-full-content table tbody tr:hover td,
[data-bs-theme="dark"] .post-content table tbody tr:hover td,
[data-bs-theme="dark"] .gh-content table tbody tr:hover td,
[data-bs-theme="dark"] .conceptual table tbody tr:hover td,
[data-bs-theme="dark"] table tbody tr:hover td,
[data-bs-theme="dark"] table tr:hover td,
html[data-bs-theme="dark"] table tr:hover td {
  background-color: #21262d !important;
}

/* Code & inline elements inside table cells */
.post-full-content table td code,
table td code {
  font-size: 0.88em !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
}

[data-bs-theme="dark"] .post-full-content table td code,
[data-bs-theme="dark"] table td code {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: #93c5fd !important;
}

/* Responsive scrolling on small screens */
@media (max-width: 768px) {
  .post-full-content table,
  .post-content table,
  .gh-content table,
  .conceptual table,
  table {
    display: block !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

/* ==========================================================================
   Media Lightbox Modal Component
   ========================================================================== */

.media-lightbox {
  border: none !important;
  border-radius: 12px !important;
  padding: 0 !important;
  background: transparent !important;
  color: #fff !important;
  max-width: 95vw !important;
  max-height: 95vh !important;
  overflow: visible !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7) !important;
  cursor: zoom-out !important;
}

.media-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

.media-lightbox-content {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  max-width: 95vw !important;
  max-height: 92vh !important;
  cursor: zoom-out !important;
}

.media-lightbox-close {
  position: absolute !important;
  top: -45px !important;
  right: 0 !important;
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: #fff !important;
  font-size: 28px !important;
  line-height: 1 !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: background 0.2s, transform 0.2s !important;
}

.media-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.1) !important;
}

.media-lightbox-body {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  max-width: 95vw !important;
  max-height: 90vh !important;
  overflow: auto !important;
  border-radius: 8px !important;
  cursor: zoom-out !important;
}

.media-lightbox-body.is-diagram {
  background: #1b1e24 !important;
  padding: 2.5rem !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
  width: min(92vw, 1280px) !important;
  max-width: 92vw !important;
  max-height: 88vh !important;
  overflow: auto !important;
  cursor: zoom-out !important;
}

html[data-bs-theme="light"] .media-lightbox-body.is-diagram {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
}

.media-lightbox-body img {
  max-width: 92vw !important;
  max-height: 88vh !important;
  object-fit: contain !important;
  border-radius: 8px !important;
  cursor: zoom-out !important;
}

.media-lightbox-body pre {
  max-width: 90vw !important;
  max-height: 85vh !important;
  font-size: 1.4rem !important;
  padding: 24px !important;
  border-radius: 8px !important;
  overflow: auto !important;
  cursor: zoom-out !important;
}

.media-lightbox-body svg {
  width: 100% !important;
  max-width: 100% !important;
  max-height: 80vh !important;
  height: auto !important;
  background: transparent !important;
  margin: auto !important;
  cursor: zoom-out !important;
}

/* --- Mermaid Diagram Container --- */
.mermaid-container,
pre.mermaid,
pre.diagram,
div.diagram-mermaid {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 2rem 0 !important;
  padding: 1.5rem !important;
  background: rgba(0, 0, 0, 0.03) !important;
  border-radius: 8px !important;
  overflow-x: auto !important;
  cursor: zoom-in !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

html[data-bs-theme="dark"] .mermaid-container,
html[data-bs-theme="dark"] pre.mermaid,
html[data-bs-theme="dark"] pre.diagram,
html[data-bs-theme="dark"] div.diagram-mermaid {
  background: rgba(255, 255, 255, 0.05) !important;
}

.mermaid-container:hover,
pre.mermaid:hover,
pre.diagram:hover,
div.diagram-mermaid:hover {
  transform: scale(1.005) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

.mermaid-container svg,
pre.mermaid svg,
pre.diagram svg,
div.diagram-mermaid svg {
  max-width: 100% !important;
  height: auto !important;
  cursor: zoom-in !important;
}

/* ==========================================================================
   Error & 404 Page Custom Styling
   ========================================================================== */
.error-template .site-main,
.error-page-main {
  padding: 0 4vw 5vw !important;
  padding-top: 0 !important;
}

.error-page-card {
  position: relative !important;
  max-width: 920px !important;
  margin: 0 auto !important;
}

.error-template .post-full-image,
.error-hero-image {
  max-height: 960px !important;
  margin-top: 0 !important;
}

.error-template .post-full-image img,
.error-hero-image img {
  max-height: 960px !important;
}

@media (min-width: 900px) {
  .error-template .post-full-image,
  .error-hero-image {
    margin-bottom: -280px !important;
  }
}

@media (max-width: 899px) and (min-width: 501px) {
  .error-template .post-full-image,
  .error-hero-image {
    margin-bottom: -180px !important;
  }
}

@media (max-width: 500px) {
  .error-template .post-full-image,
  .error-hero-image {
    margin-bottom: 2rem !important;
  }
}

.error-header {
  margin: 0 auto 2rem;
  text-align: center;
}

.error-title {
  font-size: 3.4rem;
  line-height: 1.15;
  margin: 0 0 1rem;
}

/* Frosted Glass Floating Redirect Box (Positioned at TOP of hero image backdrop) */
html[data-bs-theme="light"] .error-redirect-glass-card,
html[data-bs-theme="dark"] .error-redirect-glass-card,
.error-redirect-glass-card {
  position: absolute !important;
  top: 3.5rem !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: calc(100% - 3rem) !important;
  max-width: 1040px !important;
  z-index: 25 !important;
  margin: 0 !important;
  padding: 1.8rem 2.5rem !important;
  background: rgba(255, 255, 255, 0.33) !important;
  backdrop-filter: blur(1rem) !important;
  -webkit-backdrop-filter: blur(1rem) !important;
  border-radius: 0.85rem !important;
  box-shadow: 0 0.8rem 2rem rgba(39, 44, 49, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.error-redirect-glass-inner {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 2.5rem !important;
  text-align: left !important;
  width: 100% !important;
}

.error-redirect-info {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

html[data-bs-theme="light"] .error-redirect-glass-title,
html[data-bs-theme="dark"] .error-redirect-glass-title,
.error-redirect-glass-title {
  margin: 0 0 0.4rem !important;
  font-size: 2.2rem !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  color: #15171a !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
  line-height: 1.25 !important;
}

html[data-bs-theme="light"] .error-redirect-glass-message,
html[data-bs-theme="dark"] .error-redirect-glass-message,
.error-redirect-glass-message {
  margin: 0 !important;
  font-size: 1.6rem !important;
  line-height: 1.5 !important;
  font-family: inherit !important;
  color: #15171a !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
}

html[data-bs-theme="light"] .error-redirect-glass-message strong,
html[data-bs-theme="dark"] .error-redirect-glass-message strong,
.error-redirect-glass-message strong {
  font-weight: 700 !important;
  color: #0284c7 !important;
}

.error-redirect-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.6rem !important;
  justify-content: center !important;
  align-items: stretch !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
  min-width: 190px !important;
}

.error-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  font-size: 1.35rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 6px;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
  text-align: center;
  box-sizing: border-box;
  width: 100%;
}

.error-btn-primary {
  background: #0284c7 !important;
  color: #ffffff !important;
  border: 1px solid #0369a1 !important;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
  text-shadow: none !important;
}

.error-btn-primary:hover {
  background: #0369a1 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.error-btn-secondary {
  background: rgba(255, 255, 255, 0.6) !important;
  color: #15171a !important;
  border: 1px solid rgba(0, 0, 0, 0.2) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.error-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.85) !important;
  color: #000000 !important;
}

/* Tablet & Medium Screens */
@media (max-width: 899px) and (min-width: 601px) {
  .error-redirect-glass-card {
    top: 2rem !important;
    padding: 1.4rem 1.8rem !important;
  }
  .error-redirect-glass-title {
    font-size: 1.8rem !important;
  }
  .error-redirect-glass-message {
    font-size: 1.35rem !important;
  }
  .error-redirect-actions {
    min-width: 160px !important;
    gap: 0.5rem !important;
  }
  .error-btn {
    font-size: 1.15rem !important;
    padding: 0.55rem 1.1rem !important;
  }
}

/* Mobile Screen (< 600px) */
@media (max-width: 600px) {
  .error-redirect-glass-card {
    top: 1rem !important;
    width: calc(100% - 1.5rem) !important;
    padding: 1.2rem 1.3rem !important;
  }
  .error-redirect-glass-inner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
  }
  .error-redirect-glass-title {
    font-size: 1.6rem !important;
  }
  .error-redirect-glass-message {
    font-size: 1.25rem !important;
  }
  .error-redirect-actions {
    width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    gap: 0.5rem !important;
  }
  .error-btn {
    font-size: 1.2rem !important;
    padding: 0.6rem 1.1rem !important;
  }
}

/* ==========================================================================
   Article Audio Narration Player Card
   ========================================================================== */

.post-audio-card {
  margin: 2rem 0 2.5rem;
  padding: 1.2rem 1.5rem;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-audio-card.is-active {
  border-color: #3b82f6;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.12);
}

.post-audio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  gap: 1rem;
}

.post-audio-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.post-audio-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
  flex-shrink: 0;
}

.post-audio-text-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.post-audio-label {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.post-audio-narrator {
  font-size: 1.15rem;
  color: #64748b;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-audio-pill {
  font-size: 1.15rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: #e2e8f0;
  color: #334155;
  white-space: nowrap;
  flex-shrink: 0;
}

.post-audio-meta-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.post-audio-lang-select {
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.post-audio-lang-select:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.post-audio-controls {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
}

.post-audio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  border-radius: 8px;
  transition: transform 0.1s ease, background-color 0.2s ease, color 0.2s ease;
  color: #475569;
}

.post-audio-play {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
  flex-shrink: 0;
}

.post-audio-play:hover {
  background: #1d4ed8;
  transform: scale(1.05);
}

.post-audio-play:active {
  transform: scale(0.97);
}

.post-audio-time {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.15rem;
  font-weight: 500;
  color: #64748b;
  min-width: 34px;
  text-align: center;
  flex-shrink: 0;
}

.post-audio-scrubber-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  height: 28px;
  min-width: 80px;
}

.post-audio-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
  cursor: pointer;
  margin: 0;
  position: relative;
  z-index: 2;
}

.post-audio-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2563eb;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.post-audio-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.post-audio-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2563eb;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.post-audio-progress-bar {
  position: absolute;
  left: 0;
  top: 11px;
  height: 6px;
  width: 0%;
  background: #3b82f6;
  border-radius: 3px;
  pointer-events: none;
  z-index: 1;
}

.post-audio-speed-btn {
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  min-width: 38px;
  flex-shrink: 0;
}

.post-audio-speed-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.post-audio-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: #64748b !important;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.post-audio-download-btn:hover {
  background: #f1f5f9;
  color: #0f172a !important;
}

/* Dark Theme Overrides */
[data-bs-theme="dark"] .post-audio-card {
  background: rgba(30, 41, 59, 0.75);
  border-color: #334155;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .post-audio-card.is-active {
  border-color: #60a5fa;
  box-shadow: 0 4px 16px rgba(96, 165, 250, 0.16);
}

[data-bs-theme="dark"] .post-audio-icon {
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
}

[data-bs-theme="dark"] .post-audio-label {
  color: #f1f5f9;
}

[data-bs-theme="dark"] .post-audio-narrator {
  color: #94a3b8;
}

[data-bs-theme="dark"] .post-audio-pill {
  background: #334155;
  color: #cbd5e1;
}

[data-bs-theme="dark"] .post-audio-lang-select {
  background: #1e293b;
  border-color: #475569;
  color: #cbd5e1;
}

[data-bs-theme="dark"] .post-audio-lang-select:hover {
  border-color: #64748b;
  background: #334155;
}

[data-bs-theme="dark"] .post-audio-play {
  background: #3b82f6;
}

[data-bs-theme="dark"] .post-audio-play:hover {
  background: #2563eb;
}

[data-bs-theme="dark"] .post-audio-time {
  color: #94a3b8;
}

[data-bs-theme="dark"] .post-audio-slider {
  background: #334155;
}

[data-bs-theme="dark"] .post-audio-slider::-webkit-slider-thumb {
  background: #60a5fa;
  border-color: #1e293b;
}

[data-bs-theme="dark"] .post-audio-slider::-moz-range-thumb {
  background: #60a5fa;
  border-color: #1e293b;
}

[data-bs-theme="dark"] .post-audio-progress-bar {
  background: #60a5fa;
}

[data-bs-theme="dark"] .post-audio-speed-btn {
  background: #1e293b;
  border-color: #475569;
  color: #cbd5e1;
}

[data-bs-theme="dark"] .post-audio-speed-btn:hover {
  background: #334155;
  border-color: #64748b;
}

[data-bs-theme="dark"] .post-audio-download-btn {
  color: #94a3b8 !important;
}

[data-bs-theme="dark"] .post-audio-download-btn:hover {
  background: #334155;
  color: #f1f5f9 !important;
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
  .post-audio-card {
    padding: 1rem 1.1rem;
    margin: 1.5rem 0 2rem;
  }

  .post-audio-controls {
    gap: 0.6rem;
  }

  .post-audio-time {
    font-size: 1.05rem;
    min-width: 28px;
  }
}