/* Post pages (and the 404) — builds on theme.css (article, headings, code). Everything snaps to
   the 8px unit; the pixel is 4px, matching the theme's border and shadow. */

.post-bar {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 8px clamp(16px, 4vw, 32px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 24px;
}
.post-bar nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.post-bar p { margin: 0; }

/* Yellow rather than the theme's red: red misses 4.5:1 on the panel colour. */
.post a { color: #FFCD75; }
.post-bar a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-family: var(--font-mono);
  text-decoration: none;
}
.post-bar a:hover { text-decoration: underline; text-underline-offset: 4px; }
.post a:focus-visible { outline: 4px solid #41A6F6; outline-offset: 4px; }

.post main { padding-block: 16px 64px; }
.post article { padding: clamp(16px, 4vw, 48px); }
.post article > * { max-width: 70ch; }
.post article time { font-family: var(--font-mono); color: #FFCD75; }
.post h1 { font-size: clamp(1.5rem, 4vw, 2.25rem); line-height: 1.3; margin: 8px 0 32px; overflow-wrap: anywhere; }
.post h2 { line-height: 1.3; margin: 48px 0 16px; }
.post h3 { line-height: 1.3; margin: 32px 0 8px; }

/* Code sits on the page colour, inside the panel. */
.post code { background: var(--bg); padding: 2px 6px; font-size: 0.9em; overflow-wrap: anywhere; }
.post pre { background: var(--bg); border: 4px solid var(--line); padding: 16px; overflow-x: auto; }
.post pre code { padding: 0; overflow-wrap: normal; }
.post blockquote { margin: 24px 0; padding: 8px 16px; border-left: 8px solid #FFCD75; }
.post hr { margin: 32px 0; }

/* Wide tables scroll inside their wrapper rather than the page. */
.post .table-wrap { overflow-x: auto; }
.post table { border-collapse: collapse; }
.post th, .post td { border: 2px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.post th { background: var(--bg); }

.post-footer { border-top: 4px solid var(--line); }
