/* Scoped overrides for WYSIWYG content to ensure professional formatting and accessibility */
/* Base text styling: left-aligned and normal weight to override messy WYSIWYG inline styles */
.wysiwyg-content p,
.wysiwyg-content div:not(.wysiwyg-content),
.wysiwyg-content span,
.wysiwyg-content ul,
.wysiwyg-content ol,
.wysiwyg-content li,
.wysiwyg-content a,
.wysiwyg-content strong,
.wysiwyg-content b,
.wysiwyg-content i,
.wysiwyg-content em {
  text-align: left !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

.wysiwyg-content p,
.wysiwyg-content div:not(.wysiwyg-content),
.wysiwyg-content span {
  font-weight: 400 !important;
}

/* Ensure spacing and typography scale without tailwind typography plugin */
.wysiwyg-content p,
.wysiwyg-content ul,
.wysiwyg-content ol {
  margin-top: 1em;
  margin-bottom: 1em;
}

/* Headings */
.wysiwyg-content h1,
.wysiwyg-content h2,
.wysiwyg-content h3,
.wysiwyg-content h4 {
  color: #111827 !important;
  /* gray-900 */
  text-align: left !important;
}

.wysiwyg-content h1 {
  font-size: 2.25rem !important;
  /* 36px */
  line-height: 2.5rem !important;
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
  font-weight: 900 !important;
  letter-spacing: -0.02em !important;
}

.wysiwyg-content h2 {
  font-size: 1.875rem !important;
  /* 30px */
  line-height: 2.25rem !important;
  margin-top: 1.75rem !important;
  margin-bottom: 0.75rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em !important;
}

.wysiwyg-content h3 {
  font-size: 1.5rem !important;
  /* 24px */
  line-height: 2rem !important;
  margin-top: 1.5rem !important;
  margin-bottom: 0.75rem !important;
  font-weight: 700 !important;
}

.wysiwyg-content h4 {
  font-size: 1.25rem !important;
  /* 20px */
  line-height: 1.75rem !important;
  margin-top: 1.25rem !important;
  margin-bottom: 0.5rem !important;
  font-weight: 700 !important;
}

.wysiwyg-content ul {
  list-style-type: disc;
  padding-left: 1.5em;
}

.wysiwyg-content ol {
  list-style-type: decimal;
  padding-left: 1.5em;
}

/* Clear background colors from inline styles for accessibility */
.wysiwyg-content * {
  background-color: transparent !important;
}

/* Accessible link styling (Light Mode) */
.wysiwyg-content a {
  color: #2563eb !important;
  /* blue-600 */
  text-decoration: underline !important;
  text-underline-offset: 4px;
}

.wysiwyg-content a:hover {
  color: #1d4ed8 !important;
  /* blue-700 */
}

.wysiwyg-content a:focus-visible {
  outline: 2px solid #2563eb !important;
  outline-offset: 2px !important;
}

/* Dark mode specific overrides */
html.dark .wysiwyg-content {
  color: #e2e8f0 !important;
  /* slate-200 */
}

html.dark .wysiwyg-content * {
  color: inherit !important;
}

html.dark .wysiwyg-content h1,
html.dark .wysiwyg-content h2,
html.dark .wysiwyg-content h3,
html.dark .wysiwyg-content h4 {
  color: #f8fafc !important;
  /* slate-50 */
}

html.dark .wysiwyg-content strong,
html.dark .wysiwyg-content b {
  color: #f1f5f9 !important;
  /* slate-100 */
  font-weight: 700 !important;
}

html.dark .wysiwyg-content a {
  color: #93c5fd !important;
  /* blue-300 */
}

html.dark .wysiwyg-content a:hover {
  color: #60a5fa !important;
  /* blue-400 */
}

html.dark .wysiwyg-content a:focus-visible {
  outline: 2px solid #93c5fd !important;
  outline-offset: 2px !important;
}