/* ============================================================
   Utility pages — page-scoped components (.jm-u-*)
   404 (Bricks error template), search results (Bricks search
   template, with the no-results state) and the status pages.
   Shared parts are in bricks-tokens.css: .jm-search, .jm-journey,
   .jm-status, .jm-steps, .jm-merge, .jm-pcard, .jm-btn.
   The search field, result count, tabs, pager and result paths are
   rendered by the shortcodes in inc/search.php.
   Source: Claude Design utility/10, 20, 21, 30, pages/utility.css.
   Every page here is noindex (Rank Math).
   ============================================================ */

.jm-u-h1 {
  font-size: var(--jm--text-4xl);
  line-height: 1.1;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.jm-u-lead {
  margin: 0;
  max-width: 60ch;
  font-size: var(--jm--text-l);
  line-height: var(--jm--leading-relaxed);
  color: var(--jm--color-text-muted);
  text-wrap: pretty;
}
.jm-u-label {
  margin: 0 0 var(--jm--space-m);
  font-size: var(--jm--text-xs);
  line-height: var(--jm--leading-normal);
  font-weight: var(--jm--weight-bold);
  letter-spacing: var(--jm--tracking-wide);
  text-transform: uppercase;
  color: var(--jm--color-text-muted);
}
.jm-u-h2 {
  font-size: var(--jm--text-2xl);
  line-height: 1.3;
  font-weight: var(--jm--weight-bold);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.jm-u-h2__n { margin-left: var(--jm--space-xs); font-weight: var(--jm--weight-regular); color: var(--jm--color-text-muted); }
.jm-u-quiet {
  margin: var(--jm--space-2xl) 0 0;
  padding-top: var(--jm--space-m);
  font-size: var(--jm--text-s);
  line-height: var(--jm--leading-normal);
  color: var(--jm--color-text-muted);
  border-top: 1px solid var(--jm--color-border);
  text-wrap: pretty;
}
.jm-u-quiet a,
.jm-u-more a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: var(--jm--weight-semibold);
  color: var(--jm--color-text);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--jm--color-border-strong);
}
.jm-u-quiet a:hover,
.jm-u-more a:hover { color: var(--jm--color-brand); text-decoration-color: currentColor; }

/* ---------- 10 Page not found ---------- */
.jm-u-404 { padding-block: var(--jm--space-2xl) var(--jm--space-3xl); background: var(--jm--color-surface); }
.jm-u-404__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--jm--space-s);
  max-width: 64ch;
}
.jm-u-404__head .jm-eyebrow { margin: 0; }
.jm-u-404__search { margin-top: var(--jm--space-l); }
.jm-u-404__next { margin-top: var(--jm--space-2xl); }
.jm-u-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--jm--space-l);
  margin: var(--jm--space-l) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--jm--text-base);
}
.jm-u-more__label { font-size: var(--jm--text-s); color: var(--jm--color-text-muted); }

/* ---------- 20 Search results ---------- */
.jm-u-search { padding-block: var(--jm--space-xl) var(--jm--space-3xl); background: var(--jm--color-surface); }
.jm-u-search__head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--jm--space-s); }
.jm-u-search__h1 {
  font-size: var(--jm--text-3xl);
  line-height: var(--jm--leading-tight);
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.jm-u-search__count { margin: 0; font-size: var(--jm--text-base); color: var(--jm--color-text-muted); }
.jm-u-search__head .jm-search { margin-top: var(--jm--space-s); }

/* Tabs: links with counts; the row scrolls sideways on narrow screens. */
.jm-u-tabs { margin-top: var(--jm--space-l); overflow-x: auto; scrollbar-width: none; }
.jm-u-tabs::-webkit-scrollbar { display: none; }
.jm-u-tabs__list { display: flex; width: max-content; min-width: 100%; border-bottom: 1px solid var(--jm--color-border); }
.jm-u-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--jm--space-xs);
  min-height: 48px;
  padding: 0 20px;
  font-size: var(--jm--text-s);
  font-weight: var(--jm--weight-semibold);
  color: var(--jm--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
}
.jm-u-tab:first-child { padding-left: 0; }
.jm-u-tab:hover { color: var(--jm--color-text); }
.jm-u-tab:focus-visible { outline: none; box-shadow: inset var(--jm--shadow-focus); }
.jm-u-tab[aria-current="page"] { color: var(--jm--color-text); }
.jm-u-tab[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: -1px;
  left: 20px;
  height: 2px;
  background: var(--jm--color-brand);
}
.jm-u-tab:first-child[aria-current="page"]::after { left: 0; }
.jm-u-tab__n { font-family: var(--jm--font-mono); font-size: var(--jm--text-xs); font-weight: var(--jm--weight-medium); color: var(--jm--color-text-muted); }
.jm-u-tab[aria-current="page"] .jm-u-tab__n { color: var(--jm--color-text); }

/* Blocks are Bricks Section elements: block layout, not Bricks' centred flex column. */
.jm-u-block { display: block; margin-top: var(--jm--space-xl); }
.jm-u-block__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--jm--space-xs) var(--jm--space-m);
  margin-bottom: var(--jm--space-l);
}

/* Product grid (the "All" tab's product block and the Products tab):
   4 columns, 2 on tablets, 1 on phones (same as the shop category page). */
.jm-u-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--jm--space-l);
}
.jm-u-all { display: flex; margin-top: var(--jm--space-l); }
.jm-u-all .jm-link { min-height: 44px; font-size: var(--jm--text-base); white-space: normal; }

/* Result rows (ol.jm-u-list > li.jm-u-hit): the whole row is the link
   (the title link's ::after covers it). */
.jm-u-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--jm--color-border); }
.jm-u-hit {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--jm--space-2xs);
  margin: 0 calc(var(--jm--space-s) * -1);
  padding: var(--jm--space-l) var(--jm--space-s);
  border-bottom: 1px solid var(--jm--color-border);
  border-radius: var(--jm--radius-s);
  transition: background var(--jm--duration-base) var(--jm--ease-out);
}
.jm-u-hit:hover { background: var(--jm--color-surface-alt); }
.jm-u-hit:focus-within { box-shadow: var(--jm--shadow-focus); }
.jm-u-hit__title { font-size: var(--jm--text-l); line-height: var(--jm--leading-snug); font-weight: var(--jm--weight-semibold); letter-spacing: 0; text-wrap: pretty; }
.jm-u-hit__title a { color: var(--jm--color-text); text-decoration: none; outline: none; }
.jm-u-hit__title a::after { content: ""; position: absolute; inset: 0; }
.jm-u-hit:hover .jm-u-hit__title a { color: var(--jm--color-brand); }
.jm-u-hit__path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--jm--space-xs);
  margin: 0;
  font-size: var(--jm--text-s);
  line-height: var(--jm--leading-normal);
  color: var(--jm--color-text-muted);
}
.jm-u-hit__date { font-family: var(--jm--font-mono); font-size: var(--jm--text-xs); }
.jm-u-hit__excerpt {
  margin: var(--jm--space-2xs) 0 0;
  max-width: 72ch;
  font-size: var(--jm--text-base);
  line-height: var(--jm--leading-normal);
  color: var(--jm--color-text-muted);
  text-wrap: pretty;
}
/* The query in the excerpt: off-white fill, Jamar Black, a 2 px grey underline — no red, no amber. */
.jm-u-hit mark {
  padding: 0 2px;
  font-weight: var(--jm--weight-semibold);
  color: var(--jm--color-text);
  background: var(--jm--color-surface-alt);
  border-radius: var(--jm--radius-xs);
  box-shadow: inset 0 -2px 0 var(--jm--color-border-strong);
}
.jm-u-hit:hover mark { background: var(--jm--color-surface); }

/* Pager ([jm_search_pagination]: WordPress paginate_links). */
.jm-u-pages__list { display: flex; flex-wrap: wrap; gap: var(--jm--space-xs); margin-top: var(--jm--space-l); }
.jm-u-pages .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  font-size: var(--jm--text-s);
  font-weight: var(--jm--weight-medium);
  color: var(--jm--color-text);
  text-decoration: none;
  background: var(--jm--color-surface);
  border: 1px solid var(--jm--color-border);
  border-radius: var(--jm--radius-s);
}
.jm-u-pages a.page-numbers:hover { border-color: var(--jm--color-border-strong); }
.jm-u-pages a.page-numbers:focus-visible { outline: none; box-shadow: var(--jm--shadow-focus); }
.jm-u-pages .page-numbers.current { color: var(--jm--color-surface); background: var(--jm--color-text); border-color: var(--jm--color-text); }
.jm-u-pages .page-numbers.dots { min-width: 20px; border: 0; color: var(--jm--color-text-muted); }

/* ---------- 21 No results ---------- */
.jm-u-tips { margin-top: var(--jm--space-xl); max-width: 64ch; }
.jm-u-tips__h,
.jm-u-panel__h {
  margin: 0 0 var(--jm--space-s);
  font-size: var(--jm--text-xl);
  line-height: var(--jm--leading-snug);
  font-weight: var(--jm--weight-semibold);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.jm-u-tips__list {
  display: flex;
  flex-direction: column;
  gap: var(--jm--space-xs);
  margin: 0;
  padding-left: 1.25em;
  font-size: var(--jm--text-base);
  line-height: var(--jm--leading-normal);
  color: var(--jm--color-text-muted);
}
.jm-u-tips__list li::marker { color: var(--jm--color-text); }
.jm-u-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--jm--space-l);
  margin-top: var(--jm--space-2xl);
}
.jm-u-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--jm--space-m);
  padding: var(--jm--space-l);
  background: var(--jm--color-surface);
  border: 1px solid var(--jm--color-border);
  border-radius: var(--jm--radius-m);
}
.jm-u-panel__h { margin: 0; }
.jm-u-panel__p { margin: 0; font-size: var(--jm--text-base); line-height: var(--jm--leading-normal); color: var(--jm--color-text-muted); text-wrap: pretty; }
.jm-u-panel .jm-btn { margin-top: auto; min-height: 44px; white-space: normal; text-align: center; }
.jm-u-chips { display: flex; flex-wrap: wrap; gap: var(--jm--space-xs); margin: 0; padding: 0; list-style: none; }
.jm-u-chips:empty { display: none; }
.jm-u-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font-size: var(--jm--text-s);
  font-weight: var(--jm--weight-medium);
  color: var(--jm--color-text);
  text-decoration: none;
  background: var(--jm--color-surface);
  border: 1px solid var(--jm--color-border);
  border-radius: var(--jm--radius-pill);
  transition: border-color var(--jm--duration-base) var(--jm--ease-out);
}
.jm-u-chip:hover { color: var(--jm--color-text); border-color: var(--jm--color-border-strong); }
.jm-u-chip:focus-visible { outline: none; box-shadow: var(--jm--shadow-focus); }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .jm-u-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .jm-u-404 { padding-block: var(--jm--space-xl) var(--jm--space-2xl); }
  .jm-u-search { padding-block: var(--jm--space-l) var(--jm--space-2xl); }
  .jm-u-lead { font-size: var(--jm--text-base); line-height: var(--jm--leading-normal); }
  .jm-u-search__h1 { font-size: var(--jm--text-2xl); }
  .jm-u-tab { padding: 0 14px; }
  .jm-u-tab[aria-current="page"]::after { right: 14px; left: 14px; }
  .jm-u-h2 { font-size: var(--jm--text-xl); }
  .jm-u-grid { grid-template-columns: minmax(0, 1fr); gap: var(--jm--space-m); }
  .jm-u-hit { padding: var(--jm--space-m) var(--jm--space-s); }
  .jm-u-next { grid-template-columns: minmax(0, 1fr); gap: var(--jm--space-s); }
  .jm-u-panel { padding: var(--jm--space-m); }
  .jm-u-panel .jm-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .jm-u-hit,
  .jm-u-chip { transition: none; }
}
