/* Keep horizontal scrolling inside the content that needs it. */
.blog-post-detail .post-content {
  overflow: visible;
}

.blog-content,
.blog-content .codehilite,
.blog-content .wj-code-block {
  min-width: 0;
  max-width: 100%;
}

.blog-content {
  overflow-wrap: anywhere;
}

/* Mouse/touch fallback before JavaScript enhances each table. */
.blog-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.blog-content .post-table-scroll {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
}

/* One scroll container; retain native table layout and header/caption semantics. */
.blog-content .post-table-scroll > table {
  display: table;
  width: 100%;
  max-width: none;
  margin: 0;
  overflow: visible;
  border-radius: 0;
  box-shadow: none;
  white-space: normal;
  overflow-wrap: normal;
}

.blog-content pre,
.blog-content pre code {
  max-width: 100%;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}

.blog-content pre {
  overflow-x: auto;
}

.blog-content .post-scroll-hint {
  margin: -12px 0 22px;
  color: #475569;
  font-size: 13px;
  line-height: 1.6;
  word-break: normal;
}

.blog-content .wj-code-block > .post-scroll-hint {
  margin: 8px 0 0;
}

.blog-content .post-scroll-hint[hidden] {
  display: none;
}

.blog-content :is(.post-table-scroll, .post-code-scroll):focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

@media print {
  .blog-content .post-scroll-hint { display: none; }
  .blog-content .post-table-scroll,
  .blog-content pre { overflow: visible; }
  .blog-content pre,
  .blog-content pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
}
