/* Colours lifted from the original site's style.css - warm cream
   background, dark serif text, muted blue/purple links, brown code. */

:root {
  --bg: #ffd;
  --text: #333;
  --link: #66c;
  --link-visited: #93c;
  --muted: #666;
  --border: #cca;
  --code: #630;
  /* Shared measure for header, nav, main and footer so the whole page lines
     up on one column. 65rem matches mutt.postle.net's text column - at this
     width the 800px content images render at native size. In rem, not em, so
     the bands that set their own font-size (the footer at 0.85em) still land
     on the same edges as the body text. */
  --measure: 65rem;
  --gutter: 1rem;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  margin: 0;
  padding: 0;
  line-height: 1.55;
}

a:link {
  color: var(--link);
  text-decoration: none;
}

a:visited {
  color: var(--link-visited);
}

a:hover,
a:focus {
  text-decoration: underline;
}

.site-header {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.5em var(--gutter);
  border-bottom: 1px solid var(--border);
}

.site-header .site-title {
  font-size: 2em;
  font-weight: bold;
  text-decoration: none;
  color: var(--text);
}

.site-header .tagline {
  display: block;
  color: var(--muted);
  font-size: 0.9em;
  margin-top: 0.2em;
}

nav.archive {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0.75em var(--gutter);
  border-bottom: 1px solid var(--border);
}

nav.archive ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 1em;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9em;
}

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.5em var(--gutter) 3em;
}

main img {
  max-width: 100%;
  max-height: 220px;
  height: auto;
}

/* Gallery thumbnails: each is its own <p><a><img></a></p> in the markdown
   output - let consecutive ones flow into a row instead of stacking. */
main p:has(> a:only-child > img:only-child),
main p:has(> img:only-child) {
  display: inline-block;
  margin: 0.3em;
  vertical-align: top;
}

main pre,
main code {
  color: var(--code);
  font-family: "Courier New", monospace;
}

main pre {
  padding: 0.8em 1em;
  overflow-x: auto;
  background: rgba(0, 0, 0, 0.04);
}

.post-list article {
  margin-bottom: 1em;
  padding-bottom: 1em;
  border-bottom: 1px solid var(--border);
}

.post-list article:last-child {
  border-bottom: 0;
}

.post-list h2 {
  font-size: 1.25em;
  line-height: 1.3;
  margin: 0;
}

.post-list p {
  margin: 0.15em 0 0;
}

.post-date {
  color: var(--muted);
  font-size: 0.85em;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

.gallery img {
  max-height: 140px;
  width: auto;
}

footer.site-footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1em var(--gutter);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85em;
}

footer.site-footer a {
  color: var(--muted);
}
