/* Reindeer CMS — minimal, black-on-white public theme.
   One vertical rhythm for pages, plugin listings and plugin detail pages. */
:root {
  color-scheme: light;
  --bg: #fff;
  --text: #111;
  --muted: #555;
  --line: #d5d5d5;
  --width: 880px;
  --content-top: 28px;
  --content-bottom: 72px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.8 'Space Mono', ui-monospace, SFMono-Regular, Consolas, monospace; }
a { color: inherit; text-decoration: underline; text-underline-offset: 4px; }
a:hover { opacity: .7; }
.container { max-width: var(--width); margin: 0 auto; padding-right: 24px; padding-left: 24px; }

/* Header and the page content use the same horizontal alignment. */
.site-header { border-bottom: 1px solid var(--line); }
.nav-wrap { padding-top: 18px; padding-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-name { font-weight: 700; text-decoration: none; white-space: nowrap; line-height: normal; }
nav { display: flex; flex-wrap: wrap; gap: 10px 20px; font-size: 13px; line-height: normal; }
nav a { text-decoration: none; }
.site-header nav a.active, .site-header nav a[aria-current] { color: #111; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; }

/* Use the same top spacing on the homepage, virtual plugin pages,
   content pages, plugin detail pages and custom error pages. */
main.page, main.error-page { min-height: 65vh; padding-top: var(--content-top); padding-bottom: var(--content-bottom); }
main.page > :first-child, main.error-page > :first-child { margin-top: 0; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: normal; letter-spacing: -.035em; }
h1 { font-size: clamp(30px, 5vw, 44px); margin: 0 0 22px; }
h2 { font-size: 22px; margin: 28px 0 12px; }
h3 { font-size: 17px; margin: 24px 0 10px; }
p, ul, ol, blockquote, pre { margin: 0 0 18px; }
ul, ol { padding-left: 24px; }
blockquote { border-left: 2px solid var(--muted); padding-left: 16px; color: var(--muted); }
pre { overflow: auto; padding: 20px; border: 1px solid var(--line); line-height: 1.5; }
code { font-family: inherit; }
p code, li code { padding: 2px 5px; border: 1px solid var(--line); }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
img { display: block; max-width: 100%; height: auto; }
.site-footer { border-top: 1px solid var(--line); padding: 25px 0; color: var(--muted); font-size: 12px; }

/* The detail article is already inside main.page. Do not add a second
   60px top padding or a second full-height page in that nested element. */
.post { max-width: 730px; min-height: 0; margin: 0; padding: 0; }
.post > :first-child { margin-top: 0; }
.post h1 { margin-bottom: 5px; }
.post small { display: block; margin-bottom: 24px; }
.post .post-image { margin: 12px 0 20px; }

/* Plugin shortcodes flow straight after Markdown headings or paragraphs.
   Avoid the old 35px extra gap above every grid. */
.plugin-items { display: grid; gap: 22px; margin: 0 0 24px; }
.plugin-item { min-width: 0; margin: 0; padding: 0 0 20px; border-bottom: 1px solid var(--line); }
.plugin-item h2 { margin: 0 0 8px; }
.plugin-item h2 a { text-decoration: none; }
.plugin-item p { margin: 8px 0 12px; }
/* Portfolio dates sit directly below each card title, consistently with detail pages. */
.plugin-portfolio .portfolio-month { display: block; margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.post .portfolio-month { display: block; margin: 5px 0 20px; color: var(--muted); }
.plugin-portfolio, .plugin-gallery { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.plugin-gallery .plugin-item { margin: 0; }
.plugin-gallery img, .cover { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #f1f1f1; margin: 0 0 12px; border: 1px solid var(--line); }
figcaption, small, .muted { font-size: 12px; color: var(--muted); }

/* The embedded contact form starts at the same content position as
   the other plugins, whether used on /contact or inside a Markdown page. */
.contact-form { max-width: 640px; margin: 0 0 24px; }
.contact-form form { margin: 0; }
label { display: block; margin: 0 0 20px; font-size: 13px; }
input, textarea { display: block; width: 100%; margin-top: 8px; background: transparent; border: 1px solid #999; border-radius: 0; color: var(--text); font: inherit; padding: 11px; }
textarea { resize: vertical; }
button { font: inherit; cursor: pointer; background: var(--text); color: var(--bg); border: 1px solid var(--text); padding: 9px 20px; }
button:hover { background: transparent; color: var(--text); }
.notice { border: 1px solid var(--line); padding: 14px; margin-bottom: 20px; }
.notice.error { border-color: #b33; }
.notice.success { border-color: #38764a; }
.honeypot { position: absolute; left: -99999px; width: 1px; height: 1px; overflow: hidden; }

:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
::selection { background: #111; color: #fff; }
@media (max-width: 650px) {
  :root { --content-top: 20px; --content-bottom: 48px; }
  body { font-size: 14px; }
  .nav-wrap { display: block; }
  nav { margin-top: 14px; }
  h1 { margin-bottom: 18px; }
  .plugin-items { gap: 18px; }
}
