.blog-content {
  color: #475569;
  font-size: 1rem;
  line-height: 1.9;
}

.blog-content h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.blog-content h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.01em;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
  line-height: 1.4;
}

.blog-content h4 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #334155;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  line-height: 1.4;
}

.blog-content p {
  margin-bottom: 1.25rem;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.05),
    0 10px 15px -3px rgb(0 0 0 / 0.03);
}

.blog-content a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: #93c5fd;
  transition: all 0.2s ease;
}

.blog-content a:hover {
  color: #1d4ed8;
  text-decoration-color: #2563eb;
}

.blog-content ul,
.blog-content ol {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  padding-left: 1.75rem;
}

.blog-content ul {
  list-style-type: disc;
}

.blog-content ol {
  list-style-type: decimal;
}

.blog-content li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.blog-content li::marker {
  color: #2563eb;
  font-weight: 600;
}

.blog-content li > ul,
.blog-content li > ol {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.blog-content blockquote {
  border-left: 4px solid #2563eb;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.5rem;
  background: #f8fafc;
  border-radius: 0 0.75rem 0.75rem 0;
  font-style: italic;
  color: #334155;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.blog-content blockquote p {
  margin-bottom: 0;
}

.blog-content blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  font-style: normal;
  font-weight: 600;
  color: #94a3b8;
}

.blog-content hr {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}

.blog-content table,
.editor-content table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.blog-content table,
.blog-content th,
.blog-content td,
.editor-content table,
.editor-content th,
.editor-content td {
  border: 1px solid #e2e8f0;
}

.blog-content th,
.editor-content th {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: #0f172a;
  font-weight: 700;
  text-align: left;
  padding: 0.75rem 1rem;
}

.blog-content td,
.editor-content td {
  padding: 0.75rem 1rem;
  vertical-align: top;
}

.blog-content tbody tr:nth-child(even),
.editor-content tbody tr:nth-child(even) {
  background: #f8fafc;
}

.blog-content .tableWrapper,
.editor-content .tableWrapper {
  overflow-x: auto;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.blog-content .tableWrapper table,
.editor-content .tableWrapper table {
  margin-top: 0;
  margin-bottom: 0;
}

.blog-content .selectedCell:after,
.editor-content .selectedCell:after {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  pointer-events: none;
}

.blog-content .selectedCell,
.editor-content .selectedCell {
  position: relative;
}

.blog-content .column-resize-handle,
.editor-content .column-resize-handle {
  position: absolute;
  right: -2px;
  top: 0;
  bottom: -2px;
  width: 4px;
  background: var(--primary);
  pointer-events: none;
}

.blog-content b,
.blog-content strong {
  font-weight: 700;
  color: #0f172a;
}

.blog-content i,
.blog-content em {
  font-style: italic;
}

.blog-content > *:first-child {
  margin-top: 0;
}

.blog-content > *:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .blog-content h2 {
    font-size: 1.5rem;
  }
  .blog-content h3 {
    font-size: 1.25rem;
  }
  .blog-content h4 {
    font-size: 1rem;
  }
  .blog-content {
    font-size: 0.9375rem;
    line-height: 1.8;
  }
}

/* Editor content - mirrors blog-content for WYSIWYG */
.editor-content {
  color: #475569;
  font-size: 1rem;
  line-height: 1.9;
}

.editor-content h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.editor-content h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.01em;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
  line-height: 1.4;
}

.editor-content h4 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #334155;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  line-height: 1.4;
}

.editor-content p {
  margin-bottom: 1.25rem;
}

.editor-content img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.05),
    0 10px 15px -3px rgb(0 0 0 / 0.03);
}

.editor-content a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: #93c5fd;
  transition: all 0.2s ease;
}

.editor-content a:hover {
  color: #1d4ed8;
  text-decoration-color: #2563eb;
}

.editor-content ul,
.editor-content ol {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  padding-left: 1.75rem;
}

.editor-content ul {
  list-style-type: disc;
}

.editor-content ol {
  list-style-type: decimal;
}

.editor-content li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.editor-content li::marker {
  color: #2563eb;
  font-weight: 600;
}

.editor-content li > ul,
.editor-content li > ol {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.editor-content blockquote {
  border-left: 4px solid #2563eb;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.5rem;
  background: #f8fafc;
  border-radius: 0 0.75rem 0.75rem 0;
  font-style: italic;
  color: #334155;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.editor-content blockquote p {
  margin-bottom: 0;
}

.editor-content blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  font-style: normal;
  font-weight: 600;
  color: #94a3b8;
}

.editor-content hr {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}

.editor-content b,
.editor-content strong {
  font-weight: 700;
  color: #0f172a;
}

.editor-content i,
.editor-content em {
  font-style: italic;
}

.editor-content > *:first-child {
  margin-top: 0;
}

.editor-content > *:last-child {
  margin-bottom: 0;
}

/* TipTap Placeholder */
.editor-content p.is-editor-empty:first-child::before {
  color: #94a3b8;
  content: attr(data-placeholder);
  float: left;
  height: 0;
  pointer-events: none;
}

/* Selection styling */
.editor-content ::selection {
  background: #bfdbfe;
}

@media (max-width: 768px) {
  .editor-content h2 {
    font-size: 1.5rem;
  }
  .editor-content h3 {
    font-size: 1.25rem;
  }
  .editor-content h4 {
    font-size: 1rem;
  }
  .editor-content {
    font-size: 0.9375rem;
    line-height: 1.8;
  }
}

/* HTML Source View */
.html-source-view {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.8125rem;
  line-height: 1.7;
  padding: 1rem 1.25rem;
  tab-size: 2;
  -moz-tab-size: 2;
  color: #475569;
}

.html-source-view:focus {
  outline: none;
}

.html-source-view .hl-tag {
  font-weight: 700;
  color: #2563eb;
}

.html-source-view .hl-text {
  font-weight: 300;
  color: #64748b;
}
