/* Article presentation only: allow narrow grid tracks to shrink to the viewport. */
.single-post .content-layout > main,
.single-post .article,
.single-post .article-content,
.single-post .wanlu-ai-article { min-width: 0; max-width: 100%; }
.single-post .article { overflow-wrap: anywhere; word-break: normal; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.single-post .article > img,
.single-post .article-content img { max-width: 100%; height: auto; }
.single-post .article > img { display: block; object-fit: contain; }
.single-post .article-content figure { max-width: 100%; margin-left: 0; margin-right: 0; }
.single-post .article-content iframe,
.single-post .article-content video,
.single-post .article-content svg { max-width: 100%; }
.single-post .wanlu-ai-guide { min-width: 0; max-width: 100%; }
.single-post .wanlu-tool-links,
.single-post .wanlu-tool-title,
.single-post .wanlu-tool-heading,
.single-post .wanlu-tool-actions,
.single-post .wanlu-tool-actions > * { min-width: 0; max-width: 100%; }
.single-post .article-content pre { max-width: 100%; overflow-x: auto; }
.single-post .article-content :where(div, section, aside, figure, p, h1, h2, h3, h4, ul, ol, li, blockquote)[style] { min-width: 0 !important; max-width: 100% !important; }
/* Safe first paint and no-JavaScript fallback; JS adds an accessible scroll region. */
.single-post .article-content table { display: block; max-width: 100%; overflow-x: auto; }
.single-post .wanlu-table-scroll { display: block; min-width: 0; max-width: 100%; overflow-x: auto; margin: 1.25em 0; -webkit-overflow-scrolling: touch; }
.single-post .wanlu-table-scroll:focus-visible { outline: 2px solid var(--wl-primary, #176b5b); outline-offset: 3px; }
.single-post .wanlu-table-scroll > table { display: table; width: 100%; max-width: none; margin: 0; overflow: visible; }
.single-post .wanlu-table-scroll th,
.single-post .wanlu-table-scroll td { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .single-post .content-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .single-post .article { padding: 20px 18px; }
  .single-post .article > h1 { font-size: clamp(24px, 6.4vw, 30px); line-height: 1.4; margin: .7em 0 1em; }
  .single-post .wanlu-ai-guide { flex-wrap: wrap; white-space: normal; overflow-x: visible; gap: 8px 10px; }
  .single-post .wanlu-ai-guide > * { min-width: 0; max-width: 100%; white-space: normal; }
  .single-post .wanlu-ai-guide span { flex: 0 1 auto; }
  .single-post .wanlu-tool-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .single-post .wanlu-tool-actions a { width: 100%; min-width: 0; }
  .single-post .wanlu-tool-title { flex-wrap: wrap; }
  .single-post .wanlu-table-scroll[data-wide="true"] > table { min-width: 32rem; }
}
