/* Shared rich blog HTML — used on public pages and editor live preview */
.cms-content {
  color: #475569;
  line-height: 1.75;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
  overflow-x: auto;
  overflow-y: visible;
}
.cms-content h1,
.cms-content h2,
.cms-content h3,
.cms-content h4,
.cms-content h5,
.cms-content h6 {
  margin-top: 1.5rem;
  margin-bottom: .75rem;
  color: #1e293b;
  line-height: 1.35;
  font-size: clamp(1.1rem, 2.5vw, 1.75rem);
  max-width: 100%;
}
.cms-content h1 { font-size: clamp(1.35rem, 3vw, 2rem); }
.cms-content p,
.cms-content li {
  color: #475569;
  line-height: 1.75;
  margin-bottom: 1rem;
  max-width: 100%;
}
.cms-content ul,
.cms-content ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
  max-width: 100%;
}
.cms-content img,
.cms-content video,
.cms-content embed,
.cms-content object {
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
  display: block;
  margin: 1rem auto;
  border-radius: 12px;
}
.cms-content iframe {
  max-width: 100% !important;
  width: 100% !important;
  height: auto;
  min-height: 220px;
  aspect-ratio: 16 / 9;
  display: block;
  margin: 1rem auto;
  border: 0;
  border-radius: 12px;
}
.cms-content table {
  width: 100% !important;
  max-width: 100%;
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1rem 0;
}
.cms-content table td,
.cms-content table th {
  border: 1px solid #e2e8f0;
  padding: 8px 10px;
  word-break: break-word;
}
.cms-content figure {
  max-width: 100%;
  margin: 1rem 0;
}
.cms-content figure img {
  margin: 0 auto;
}
.cms-content blockquote {
  margin: 1rem 0;
  padding: 12px 16px;
  border-left: 4px solid #7c3aed;
  background: #f8fafc;
  color: #334155;
}
.cms-content pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 14px;
  border-radius: 10px;
  background: #0f172a;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
}
.cms-content * {
  max-width: 100%;
  box-sizing: border-box;
}
.cms-content div,
.cms-content section,
.cms-content article,
.cms-content header,
.cms-content footer,
.cms-content nav,
.cms-content main,
.cms-content aside {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  position: static !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0;
  padding-right: 0;
  background: transparent !important;
  color: inherit;
  box-shadow: none !important;
  border-radius: 0;
  min-height: 0 !important;
  height: auto !important;
}
.cms-content input,
.cms-content button,
.cms-content select,
.cms-content textarea,
.cms-content form {
  display: none !important;
}

/* Editor layout — stacked so dashboard sidebar has enough room */
.blog-editor-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}
.blog-editor-pane,
.blog-preview-pane {
  min-width: 0;
  width: 100%;
}
.blog-editor-pane .note-editor {
  width: 100%;
}
.blog-editor-pane .note-editable {
  min-height: 280px;
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
}
.blog-editor-pane .note-editable * {
  max-width: 100% !important;
  position: static !important;
}
.blog-preview-pane h4 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: #334155;
}
.blog-preview-frame {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.blog-preview-iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
  background: #fff;
}
.blog-preview-empty {
  color: #94a3b8;
  font-size: 14px;
  text-align: center;
  padding: 48px 16px;
  margin: 0;
}
