/* Archive templates: the blog index (blog.html), the category archive (category.html), the page-not-found template (404.html)
   and the plain page template (page.html). Everything else comes from design-system.css. Mobile-first.
   Post lists reuse .card--row; the Query Loop block becomes the list, so each item keeps one image, one title and no post meta. */

/* Archive header: breadcrumbs, the page's h1, one sentence and the topic chips.
   The category archive adds has-steel-background-color and the display size, so the category name is the page's one type moment. */
.archive-head { padding-block: clamp(2rem, 5vw, 3.5rem); }
.archive-head__crumbs { margin-bottom: var(--space-5); }
.archive-head__title { max-width: 18ch; margin-bottom: var(--space-4); }
.archive-head__title--display { font-size: var(--fs-1000); line-height: var(--lh-tight); }
.archive-head__lead { margin-bottom: var(--space-5); }
.archive-head__chips { margin-top: var(--space-5); }

/* Feature: the newest or main post of a list. Photo and title side by side from 40em; the whole block is one link on the title.
   The source photos are small (450 to 600 px wide), so the photo never grows past 28rem. */
.feature { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
.feature__image { display: block; width: 100%; max-width: 28rem; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-l); }
.feature__title { margin-bottom: var(--space-3); font-size: var(--fs-700); line-height: var(--lh-snug); }
.feature__link { color: var(--heading); text-decoration: none; }
.feature__link::after { content: ""; position: absolute; inset: 0; }   /* stretches the link over the whole feature */
.feature__deck { max-width: 46ch; margin: 0; color: var(--text-muted); font-size: var(--fs-500); }
@media (hover: hover) {
  .feature__link:hover { text-decoration: underline; text-underline-offset: 0.2em; }
}
@media (min-width: 40em) {
  .feature { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: var(--space-6); }
}
@media (min-width: 64em) {
  .feature { grid-template-columns: minmax(0, 28rem) minmax(0, 1fr); gap: var(--space-8); }
  .feature__title { font-size: var(--fs-800); }
}

/* A list of posts: rows (.card--row) in one column on phones and two from 64em */
.archive-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
@media (min-width: 64em) {
  .archive-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
}
@media (min-width: 64em) {
  .archive-list--single { grid-template-columns: minmax(0, 1fr); }
}
.archive-list--spaced { margin-top: var(--space-7); }

/* Pagination: pill links with the same 2px control border as the chips; the current page is filled */
.pagination { margin-top: var(--space-7); }
.pagination__list { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--target);
  min-height: var(--target);
  padding: 0.4rem 0.95rem;
  background: var(--surface);
  color: var(--espresso);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-pill);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}
.pagination__link:hover,
.pagination__link[aria-current="page"] { background: var(--olive); color: var(--white); border-color: var(--olive); }
.pagination__link--next { margin-left: var(--space-3); }

/* Page not found: the title, one sentence and a search on the left; three main guides on the right.
   The 404 numeral is decorative CSS (empty alt text), the same device as the 01 to 04 on the homepage panels. */
.notfound { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6) var(--space-8); padding-block: clamp(2.5rem, 7vw, 5rem); }
.notfound__title::before {
  content: "404" / "";
  display: block;
  margin-bottom: var(--space-2);
  color: var(--numeral);
  font: var(--fw-semibold) var(--fs-1000) / 1 var(--font-heading);
}
.notfound__title { max-width: 14ch; margin-bottom: var(--space-4); }
.notfound__lead { margin-bottom: var(--space-5); }
.notfound__guides { margin-bottom: var(--space-4); font-size: var(--fs-700); }
@media (min-width: 64em) {
  .notfound { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
}
