/* blogpost.css — shared by all individual blog post pages */
.post-header { padding: 70px 0 30px; }
.post-header h1 { font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.12; }
.post-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 14px; }
.post-body { max-width: 720px; padding-bottom: 60px; }
.post-body h2 { margin-top: 1.6em; font-size: 1.4rem; }
.post-body p { max-width: none; }
.post-cta { background: var(--paper-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-top: 40px; }
.post-cta p { margin-bottom: 14px; }

/* "Keep reading" block at the end of each post (round 5) */
.post-related { margin-top: 56px; padding-top: 8px; border-top: 1px solid var(--line); }
.post-related h2 { font-size: 1.25rem; margin: 28px 0 0; }
.post-related .read-grid { grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.post-related .read-card { padding: 18px; }
.post-related .read-title { font-size: 0.98rem; }
.post-related-all { margin-top: 18px; font-weight: 600; }
.post-related-all a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 3px; }
@media (max-width: 640px) { .post-related .read-grid { grid-template-columns: 1fr; } }

/* ---- Long-form post components (round 6) ---- */
.post-body h2 { scroll-margin-top: 96px; }
.post-body h3 { font-size: 1.12rem; margin: 1.7em 0 0.4em; scroll-margin-top: 96px; }
.post-body p a, .post-body li a, .post-body td a, .post-note a {
  color: var(--ink); font-weight: 600; text-decoration: underline;
  text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.post-body p a:hover, .post-body li a:hover, .post-body td a:hover, .post-note a:hover { background: rgba(240, 169, 58, 0.18); }
.post-body ul, .post-body ol { margin: 0 0 1.3em; padding-left: 1.35em; max-width: 64ch; }
.post-body li { margin-bottom: 0.55em; padding-left: 0.2em; }
.post-body li::marker { color: var(--amber-deep); font-weight: 700; }
.post-body strong { font-weight: 650; }

/* contents list */
.post-toc { background: var(--paper-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px 8px; margin: 28px 0 8px; }
.post-toc-h { font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber-deep); margin: 0 0 8px; }
.post-body .post-toc ol { margin: 0 0 10px; padding-left: 1.2em; }
.post-body .post-toc li { margin-bottom: 0.3em; font-size: 0.97rem; }
.post-body .post-toc a { font-weight: 500; text-decoration: none; }
.post-body .post-toc a:hover { text-decoration: underline; text-decoration-color: var(--amber); background: none; }

/* short version */
.post-tldr { border-left: 4px solid var(--amber); background: #fff; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px 6px; margin: 26px 0; }
.post-tldr-h { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; margin: 0 0 8px; }
.post-body .post-tldr ul { margin-bottom: 12px; }

/* callouts */
.post-note { background: var(--paper-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px 4px; margin: 26px 0; }
.post-note-h { font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber-deep); margin: 0 0 6px; }
.post-note p { font-size: 0.97rem; }

/* tables */
.post-table-block { margin: 26px 0; }
.post-table-cap { font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; margin: 0 0 8px; line-height: 1.35; }
.post-table-wrap { overflow-x: auto; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; -webkit-overflow-scrolling: touch; }
.post-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; min-width: 520px; }
.post-table th { text-align: left; background: var(--ink); color: #fff; font-weight: 600; padding: 11px 14px; font-size: 0.86rem; letter-spacing: 0.02em; }
.post-table td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.45; }
.post-table tbody tr:nth-child(even) td { background: var(--paper); }
.post-table td:first-child { font-weight: 600; }

/* numbered steps */
.post-steps { list-style: none; counter-reset: ps; padding: 0 !important; margin: 24px 0 !important; max-width: none !important; }
.post-steps li { counter-increment: ps; position: relative; padding: 0 0 0 52px !important; margin: 0 0 20px !important; min-height: 36px; }
.post-steps li::before { content: counter(ps); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--amber); font-family: var(--font-display); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.post-steps li::marker { content: none; }
.post-step-t { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin-bottom: 2px; }

/* figures */
.post-figure { margin: 30px 0; }
.post-figure svg { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.post-figure .fig-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
@media (max-width: 640px) {
  .post-figure .fig-scroll svg { min-width: 560px; }
}
.post-figure figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 10px; line-height: 1.45; }

/* FAQ at the foot of a post */
.post-faq { margin-top: 12px; }
.post-faq h3 { margin-top: 1.4em; }

@media (max-width: 640px) {
  .post-header { padding-top: 48px; }
  .post-steps li { padding-left: 46px !important; }
  .post-toc { padding: 16px 16px 6px; }
}
