/* Layout only.
 *
 * Type, colour, both themes and every control come from Rixer's own stylesheet, which
 * arrives with the chrome — so this file must not restate any of it. Anything set here
 * that the site already sets is a second source of truth that will drift.
 *
 * The variables used below (--line, --muted, --surface-2, --radius-sm …) are the site's
 * own, defined in style.css for both the light and dark themes. Using them is what makes
 * the blog change colour with the rest of the site rather than staying light while the
 * header goes dark. */

.blog-wrap { max-width: 64rem; margin: 0 auto; }

/* The one place this file overrides the site's own layout, and it is layout, not type.
   `main` carries 4rem of bottom padding and `.site-footer` another 3rem of top margin —
   112px of nothing between a post's closing call to action and the footer, which reads as
   the page having ended twice. Scoped to the blog because blog.css only loads here. */
main { padding-bottom: 1.5rem; }

/* ---------- masthead ---------- */
.blog-head { margin: 0 0 2rem; text-align: center; }
.blog-head h1 { margin: 0 0 .4rem; }
.blog-kicker {
  margin: 0 0 .3rem; font-size: .74rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent);
}
.blog-lede {
  color: var(--muted); font-size: 1.02rem; line-height: 1.6;
  margin: 0 auto; max-width: 34rem;
}

.blog-cats { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 1.1rem; }
.blog-cats a {
  padding: .28rem .8rem; border-radius: 999px; border: 1px solid var(--line);
  text-decoration: none; color: var(--text-2); font-size: .85rem; font-weight: 500;
}
.blog-cats a:hover { border-color: var(--line-strong); color: var(--text); }
.blog-cats a.is-on { background: var(--accent-wash); color: var(--accent-deep); border-color: var(--accent-deep); }

/* ---------- byline ----------
   The same three facts wherever a post appears, from one partial. */
.blog-byline { display: flex; align-items: center; gap: .6rem; margin: 0 0 1.2rem; }
.blog-byline-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.blog-author { font-weight: 600; font-size: .9rem; color: var(--text); }
.blog-byline-meta { color: var(--muted); font-size: .8rem; }
.blog-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: block;
  border: 1px solid var(--line); background: var(--surface-2); object-fit: cover;
}
.blog-byline-sm { margin: .6rem 0 0; }
.blog-byline-sm .blog-avatar { width: 26px; height: 26px; }
.blog-byline-sm .blog-author { font-size: .82rem; }
.blog-byline-sm .blog-byline-meta { font-size: .76rem; }

/* ---------- the feature ----------
   The newest post, full width. With one post published this IS the index, which is why
   the old single-card-in-an-empty-screen looked like a rendering failure. */
.blog-feature {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 1.6rem; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface); overflow: hidden; margin-bottom: 2rem;
}
.blog-feature-media { display: block; align-self: stretch; }
.blog-feature-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-feature-body { padding: 1.6rem 1.8rem 1.6rem 0; }
.blog-feature h2 { font-size: 1.75rem; line-height: 1.22; margin: 0 0 .5rem; }
.blog-feature h2 a { text-decoration: none; color: var(--text); }
.blog-feature h2 a:hover { text-decoration: underline; }
.blog-feature-cta { margin: 1.1rem 0 0; }

/* ---------- the grid ----------
   `auto-fill` with a floor, so two posts do not stretch into two half-page slabs and
   twelve do not shrink into a wall. */
.blog-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.6rem;
}
.blog-card {
  display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface); overflow: hidden;
  transition: border-color .15s ease, transform .15s ease;
}
.blog-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.blog-card-body { padding: 1rem 1.1rem 1.2rem; min-width: 0; }
.blog-card h2 { margin: 0 0 .35rem; font-size: 1.1rem; line-height: 1.35; }
.blog-card h2 a { text-decoration: none; color: var(--text); }
.blog-card h2 a:hover { text-decoration: underline; }
.blog-thumb { display: block; }
.blog-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.blog-excerpt { margin: 0; color: var(--text-2); line-height: 1.6; font-size: .92rem; }
.blog-feature .blog-excerpt { font-size: 1rem; }

.blog-empty { text-align: center; }

/* ---------- one post ----------
   52rem, not 44rem (Richard, 2026-09-08). Wider than the 60-75 characters typography
   books ask for, and right anyway: these are reviews full of tables, lists and short
   verdict lines, and a narrow column turns a four-column table into a scrollbar. */
/* No bottom margin. `.site-footer` already carries `margin-top: 3rem` and `main` its own
   padding, so a third gap here stacked into a screenful of nothing between the closing
   call to action and the footer. */
.blog-post { max-width: 52rem; margin: 0 auto; }
.blog-post > .crumb { margin-bottom: .4rem; }
.blog-post h1 { margin: .2rem 0 .9rem; }
.blog-post > .blog-byline { padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.blog-hero { margin: 1.4rem 0; }
.blog-hero img { width: 100%; height: auto; border-radius: var(--radius-sm); display: block; }

.blog-body { line-height: 1.75; font-size: 1.04rem; }
.blog-body > * + * { margin-top: 1.1rem; }
.blog-body h2 { margin-top: 2.2rem; font-size: 1.45rem; }
.blog-body h3 { margin-top: 1.7rem; font-size: 1.15rem; }
.blog-body img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.blog-body blockquote {
  margin-left: 0; padding: .6rem 1rem; border-left: 3px solid var(--accent-deep);
  background: var(--surface-2); color: var(--text-2);
}
.blog-body code {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px;
  padding: .05rem .3rem; font-size: .92em;
}
.blog-body pre {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .9rem 1rem; overflow-x: auto;
}
.blog-body pre code { background: none; border: 0; padding: 0; }
.blog-body ul, .blog-body ol { padding-left: 1.3rem; }
.blog-body li + li { margin-top: .35rem; }
/* Tables scroll rather than overflow. A review's payout table is often wider than any
   measure, and a table that runs off the page takes the layout with it. */
.blog-body table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.blog-body th, .blog-body td { border: 1px solid var(--line); padding: .55rem .75rem; text-align: left; }
.blog-body th { background: var(--surface-2); font-weight: 600; }

.blog-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 2rem 0 0; }
.blog-tags a {
  padding: .22rem .7rem; border-radius: 999px; border: 1px solid var(--line);
  text-decoration: none; color: var(--muted); font-size: .8rem;
}
.blog-tags a:hover { border-color: var(--line-strong); color: var(--text-2); }

/* ---------- the author ---------- */
.blog-author-card {
  display: flex; gap: 1.1rem; align-items: flex-start; margin-top: 2.2rem;
  padding: 1.3rem 1.4rem; border: 1px solid var(--line);
  border-radius: var(--radius-md); background: var(--surface-2);
}
.blog-avatar-lg {
  /* 95px, a quarter up from 76 (Richard, 2026-09-08). The author block is the one place
     on the site where a face is the point rather than a marker. */
  width: 95px; height: 95px; border-radius: 50%; flex: none; display: block;
  border: 1px solid var(--line); background: var(--surface); object-fit: cover;
}
.blog-author-kicker {
  margin: 0 0 .1rem; font-size: .7rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint);
}
.blog-author-name { margin: 0 0 .4rem; font-weight: 700; font-size: 1.05rem; }
.blog-author-bio { margin: 0; color: var(--text-2); line-height: 1.65; font-size: .93rem; }

/* ---------- next / previous ---------- */
.blog-nextprev {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: .8rem; margin-top: 1.4rem;
}
.blog-nextprev-item {
  display: grid; gap: .2rem; padding: .9rem 1.1rem; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface);
}
.blog-nextprev-item:hover { border-color: var(--line-strong); }
.blog-nextprev-item span { color: var(--muted); font-size: .78rem; }
.blog-nextprev-item b { color: var(--text); font-weight: 600; line-height: 1.35; }
.blog-nextprev-next { text-align: right; }

/* ---------- the tail ----------
   A post ends and the reader is still here. This is the one thing the whole site exists
   to do, so it is the offer rather than "subscribe to our newsletter". */
.blog-cta {
  margin-top: 2rem; padding: 1.6rem; text-align: center;
  border: 1px solid var(--line-strong); border-radius: var(--radius-md);
  background: var(--surface-2);
}
.blog-cta h2 { margin: 0 0 .4rem; }
.blog-cta p { color: var(--muted); margin: 0 auto 1.1rem; max-width: 34rem; line-height: 1.6; }
.blog-cta .page-search { margin: 0 auto; }

.blog-pager { margin-top: 2.4rem; }
.blog-pager .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.blog-pager a, .blog-pager .current {
  padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--line);
  text-decoration: none; color: var(--text-2);
}
.blog-pager .current { background: var(--accent-wash); color: var(--accent-deep); border-color: var(--accent-deep); }
.blog-pager h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

@media (max-width: 820px) {
  /* The feature stacks. Its image keeps a fixed ratio rather than stretching to a row
     height that no longer exists. */
  .blog-feature { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .blog-feature-media img { aspect-ratio: 16 / 9; height: auto; }
  .blog-feature-body { padding: 1.3rem 1.4rem 1.5rem; }
  .blog-feature h2 { font-size: 1.45rem; }
}
@media (max-width: 620px) {
  .blog-author-card { flex-direction: column; }
  .blog-nextprev-next { text-align: left; }
}
