/* ===== Single blog post — v5 layout =====
   Loaded only by post-botcs-v5-preview.php. Relies on the design tokens and
   shared components (.content, .doc-section, header, footer) from
   botcs-v5-preview.css. */

#main { background: linear-gradient(180deg, var(--navy-deep) 0, var(--navy) 180px, var(--bg) 180px); }

.post-layout { display: grid; grid-template-columns: 1fr; gap: 28px; padding: 26px 20px 72px; align-items: start; }
.post-main { min-width: 0; }

/* Byline bar (on the navy ATF) */
.post-byline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 22px; }
.post-byline-author { display: flex; align-items: center; gap: 12px; }
.post-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--red); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 700; font-size: 17px; flex-shrink: 0; }
.post-byline-name { font-weight: 600; font-size: 14px; color: #fff; line-height: 1.3; }
.post-byline-role { display: block; font-weight: 500; font-size: 12px; color: rgba(255,255,255,0.6); }
.post-byline-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.post-pubdate { font-size: 13px; color: rgba(255,255,255,0.78); }
.post-pubdate strong { color: #fff; }
.post-share { display: inline-flex; gap: 8px; }
.post-share a { width: 30px; height: 30px; border-radius: 6px; background: rgba(255,255,255,0.14); color: #fff; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-size: 12px; font-weight: 700; transition: background 0.15s ease; }
.post-share a:hover { background: var(--red); color: #fff; }

/* Framed featured image */
.post-figure { margin: 0 0 28px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); background: var(--navy-deep); }
.post-figure img { width: 100%; height: auto; display: block; }

/* Title + deck */
.post-title { font-size: clamp(28px, 4vw, 42px); line-height: 1.16; margin: 0 0 16px; }
.post-deck { font-size: 18px; color: var(--ink-2); margin: 0 0 28px; line-height: 1.55; max-width: 680px; }

/* First body section sits flush under the deck (guards against wpautop noise) */
.post-main .content > p:empty { display: none; }
.post-main .content > .doc-section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }

/* Body lists inside post content */
.post-main .content .doc-section ul,
.post-main .content .doc-section ol { margin: 0 0 16px; padding-left: 22px; }
.post-main .content .doc-section li { margin: 0 0 8px; color: var(--ink-2); }
.post-main .content .doc-section li:last-child { margin-bottom: 0; }

/* Hand-written comparison tables in post content.
   Table skin (.data-table) comes from botcs-v5-preview.css; this adds the
   horizontal scroll container it needs inside the narrower post column. */
.post-main .content .data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 20px; }
.post-main .content .data-table-wrap .data-table { margin: 0; }

/* Sidebar */
.blog-sidebar { display: grid; gap: 24px; }
.blog-widget { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; }
.blog-widget-title { margin: 0; padding: 16px 20px; background: var(--bg-tint); border-bottom: 1px solid var(--rule); font-family: var(--serif); font-weight: 700; font-size: 16px; color: var(--navy-deep); }
.blog-cat-menu { list-style: none; margin: 0; padding: 14px; display: grid; gap: 10px; }
.blog-cat-link { display: block; width: 100%; text-align: left; font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--navy-deep); background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: 11px 16px; text-decoration: none; transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease; }
.blog-cat-link:hover { border-color: var(--navy); color: var(--navy); }
.blog-cat-link.is-active { background: var(--navy-deep); border-color: var(--navy-deep); color: #fff; }
.blog-about { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius-lg); text-decoration: none; color: var(--navy-deep); font-family: var(--serif); font-weight: 700; font-size: 16px; transition: border-color 0.15s ease; }
.blog-about:hover { border-color: var(--navy); color: var(--navy-deep); }
.blog-about-arrow { width: 34px; height: 34px; border-radius: 50%; background: var(--bg-tint); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-weight: 700; }
.blog-about:hover .blog-about-arrow { background: var(--red); color: #fff; }

@media (min-width: 1024px) {
  #main { background: linear-gradient(180deg, var(--navy-deep) 0, var(--navy) 240px, var(--bg) 240px); }
  .post-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; padding: 30px 20px 88px; }
  .blog-sidebar { position: sticky; top: 88px; }
}
