/* Blog (blog/). Loads after category.css and catalogue.css and is laid out like the
   category page: the same hero (copy left, photo on the Paper mount with the label
   slip right), the same sticky filter bar and the same format cards. Only what
   differs lives here: the hero holds two thirds of the screen, the bar carries a
   search pill in place of the listbox filters, and the cards carry a topic tag. */

/* ---------- Hero ---------- */
.bhero { min-height: 66.667vh; min-height: 66.667svh; padding-top: 7rem; padding-bottom: 3rem; }
.bhero .chero__mount img { aspect-ratio: 16 / 9; }
.bhero .label dd { min-width: 4.5rem; }

/* ---------- Filter bar: topic tabs + search ---------- */
.blog { padding-top: 3rem; }
.blog .pbar { scroll-margin-top: 6rem; }
.blog .ptabs { flex: 0 1 auto; min-width: 0; }
/* nine topics have to fit beside the search, so the live count sits in the search pill */
.blog .ptabs { gap: 0; }
.blog .ptab { padding: 0 0.875rem; }
.blog .ptab__n { display: none; }
.bfind {
  position: relative; flex: none; display: flex; align-items: center;
  width: 12rem; height: 3.375rem;
  border-radius: 999px; background: var(--paper-2);
  transition: background-color 0.3s, box-shadow 0.3s;
}
.bfind:hover { background: #e9e5dd; }
.bfind:focus-within { background: #fff; box-shadow: 0 0 0 1px var(--ink-strong); }
.bfind svg { position: absolute; left: 1.25rem; width: 1rem; height: 1rem; fill: none; stroke: var(--ink-strong); stroke-width: 1.6; stroke-linecap: round; pointer-events: none; }
.bfind input {
  flex: 1; min-width: 0; height: 100%; padding: 0 0.5rem 0 2.875rem;
  border: 0; background: none; outline: none;
  font: inherit; font-size: max(14px, 0.9375rem); font-weight: 500; color: var(--ink-strong);
  caret-color: var(--orange);
}
.bfind input::placeholder { color: #6f675e; }
.bfind input::-webkit-search-cancel-button { display: none; }
.bfind__count { /* announced to screen readers; the tabs need the room */
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Cards ---------- */
.blogp .bcard .fcard__photo img {
  /* Use the uploaded variant's intrinsic ratio so the complete artwork stays visible. */
  aspect-ratio: auto;
  object-fit: contain;
  background: var(--kraft);
}
.blogp .bcard__ph { display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--kraft); }
.bcard__ph svg { width: 3rem; height: 3rem; fill: none; stroke: var(--orange); stroke-width: 1.2; stroke-linejoin: round; }
.bcard__tag {
  position: absolute; left: 0.875rem; bottom: 0.875rem;
  padding: 0.3125rem 0.75rem; border-radius: 999px;
  background: rgba(251, 250, 247, 0.94); color: var(--ink-strong);
  font-size: max(11px, 0.75rem); font-weight: 600;
  box-shadow: 0 0.25rem 0.75rem -0.25rem rgba(26, 23, 18, 0.25);
}
.bcard .fcard__name a { transition: color 0.3s; }
.bcard:hover .fcard__name a { color: var(--orange-deep); }
.bcard__go { gap: 0.5rem; padding: 0 1rem; }
.bcard__go svg { width: 0.875rem; height: 0.875rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: translate 0.4s var(--ease-soft); }
.bcard:hover .bcard__go { border-color: var(--orange); background: var(--orange); color: #fff; }
.bcard:hover .bcard__go svg { translate: 0.1rem -0.1rem; }

.blogp .finder__empty { margin-top: 0; text-align: center; }
.blogp .finder__empty[hidden] { display: none; }
#b-more-n { font-weight: 500; color: var(--ink-soft); }
.more:hover #b-more-n { color: inherit; }
.blogp .cx-quote { margin-inline: var(--col); }

@media (prefers-reduced-motion: reduce) {
  .bcard__go svg { transition: none; }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .blog .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bfind { width: 13rem; }
}

/* ---------- Phones ---------- */
@media (max-width: 767.98px) {
  .bhero { min-height: 0; padding-top: 6rem; }
  .bhero .chero__actions .link { display: inline-flex; }
  .blog { padding-top: 0.5rem; }
  /* The topics stay on phones (the category page hides its tabs), above the search. */
  .blog .pbar::before { display: none; } /* not sticky here, and it would poke past the screen edge */
  .blog .pbar { position: static; flex-direction: column; align-items: stretch; gap: 0.75rem; margin-bottom: 1.25rem; }
  .blog .pbar .ptabs { display: flex; width: auto; margin: 0 calc(var(--edge) * -1); padding: 0.3125rem; border-radius: 0; background: none; }
  .blog .ptab { height: 2.5rem; padding: 0 1rem; background: var(--paper-2); }
  .blog .ptab[aria-selected="true"] { background: var(--orange); }
  .blog .ptab:first-child { margin-left: calc(var(--edge) - 0.3125rem); }
  .blog .ptab:last-of-type { margin-right: calc(var(--edge) - 0.3125rem); }
  .blog .ptabs__pill { display: none; }
  .bfind { width: 100%; height: 3rem; }
  .bfind input { font-size: 16px; }

  /* Article titles run long, so one card per row. */
  .blog .fgrid, .more-notes .fgrid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .blogp .formats__more { display: flex; }
  .blogp .bcard .fcard__photo img { aspect-ratio: auto; }
  .bcard .fcard__name { margin: 0.875rem 0.5rem 0; font-size: 1.375rem; }
  .bcard .fcard__foot { display: flex; padding: 0.875rem 0.5rem 0.25rem; }
  .bcard .fcard__moq { position: static; padding: 0; background: none; color: #6b5440; font-size: 12px; font-weight: 500; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .bcard .add { width: auto; }
  .blogp .cx-quote { margin-inline: var(--edge); }
}
