/* syscall.cafe additions on top of hugo-xmin */

/* Nav and TOC links: same color whether visited or not */
.menu a:visited, .toc a:visited { color: LinkText; }

/* Figures with captions (render-image.html). Goldmark leaves an empty <p>
   around a lone image; hide it so figures do not get double margins. */
figure { text-align: center; margin: 1.2em 0; }
figure img { display: inline-block; }
figcaption { font-size: .9em; color: #666; margin-top: .4em; }
figure + figure { margin-top: 0; }
p:empty:has(+ figure), figure + p:empty { display: none; }

/* Images on one line ({{< image-row >}}): figures shrink to share the row,
   never wrap; stacked below 600px */
.image-row { display: flex; justify-content: center; align-items: flex-start; gap: .6rem; margin: 1.2rem auto; }
.image-row-link { display: block; }
.image-row-figure { margin: 0; min-width: 0; }
.image-row img { max-height: 300px; max-width: 100%; width: auto; }
@media (max-width: 600px) {
  .image-row { flex-direction: column; align-items: center; }
  .image-row img { max-height: none; }
}

/* Post lists: fixed-width date column so titles line up */
ul .date { display: inline-block; min-width: 6.2em; font-variant-numeric: tabular-nums; }

/* Table of contents */
.toc { background: #f9f9f9; border: 1px solid #ddd; padding: .5em 1em; margin: 1em 0; }
.toc p { margin: 0 0 .3em; }
.toc ul { margin: 0; padding-left: 1.2em; }

/* Tags under a post */
.tags { margin-top: 1.5em; }
.tag { background: #eee; border-radius: 5px; padding: 2px 6px; text-decoration: none; }

/* {{< callout type=... >}} */
.callout { background: #f9f9f9; border-left: 5px solid #ccc; padding: 3px 1em; margin: 1em 0; }
.callout-content p:last-child { margin-bottom: 0; }
.callout-info    { border-left-color: #3366cc; }
.callout-success { border-left-color: #1f7a3d; }
.callout-warning { border-left-color: #b06a00; }
.callout-danger  { border-left-color: #b81d1d; }

/* Footnotes */
.footnotes { font-size: .9em; color: #555; }

/* 88x31 badges (home, contact) */
.banner { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2em; }
.banner-icon img { display: block; }
main > .banner-icon { margin-top: 1em; }

/* Password-protected pages (write-ups) */
.password-overlay { padding: 1em 0; }
.password-prompt input { max-width: 380px; width: 100%; padding: .5em; border: 1px solid #ddd; margin-bottom: .6em; font: inherit; }
.password-prompt button { padding: .4em 1em; font: inherit; cursor: pointer; }
.error-message { color: #b81d1d; }
.locked-content { display: none; }
