/* libcatalog reference styles: minimal, accessible, override-friendly. A theme can
   replace this by shadowing assets/lcat.css. Uses system fonts and a simple grid. */
:root {
  --lcat-fg: #1a1a1a;
  --lcat-bg: #fff;
  --lcat-accent: #0b5cad;
  --lcat-muted: #5a5a5a;
  --lcat-border: #d5d5d5;
  --lcat-maxw: 68rem;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--lcat-fg);
  background: var(--lcat-bg);
  font: 100%/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
a { color: var(--lcat-accent); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--lcat-accent);
  outline-offset: 2px;
}
.lcat-skip {
  position: absolute;
  left: -999px;
}
.lcat-skip:focus {
  left: 0.5rem;
  top: 0.5rem;
  z-index: 10;
  background: var(--lcat-bg);
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--lcat-accent);
}
.lcat-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.lcat-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--lcat-border);
}
.lcat-brand { font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.lcat-search { display: flex; gap: 0.5rem; }
.lcat-search input {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--lcat-border);
  border-radius: 4px;
  min-width: 16rem;
}
.lcat-search button {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--lcat-accent);
  background: var(--lcat-accent);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}
/* Optional Pagefind search UI (tasks/017): themed to the module accent and sized to
   sit in the header. Pagefind ships its own pagefind-ui.css; these custom properties
   just align it with lcat.css. Only present when [params.search] engine = "pagefind". */
.lcat-search-pagefind {
  --pagefind-ui-primary: var(--lcat-accent);
  --pagefind-ui-text: var(--lcat-fg);
  --pagefind-ui-background: var(--lcat-bg);
  --pagefind-ui-border: var(--lcat-border);
  --pagefind-ui-font: inherit;
  --pagefind-ui-border-radius: 4px;
  min-width: 18rem;
  flex: 1 1 22rem;
  max-width: 32rem;
}
.lcat-layout {
  display: grid;
  grid-template-columns: 16rem 1fr;
  gap: 2rem;
  max-width: var(--lcat-maxw);
  margin: 0 auto;
  padding: 1.5rem 1rem;
}
@media (max-width: 48rem) {
  .lcat-layout { grid-template-columns: 1fr; }
}
.lcat-main:focus { outline: none; }
.lcat-facet { margin-bottom: 1rem; border-bottom: 1px solid var(--lcat-border); padding-bottom: 0.5rem; }
.lcat-facet summary { cursor: pointer; font-weight: 600; }
.lcat-facet-total, .lcat-count { color: var(--lcat-muted); font-size: 0.85em; }
.lcat-facets ul { list-style: none; margin: 0.5rem 0 0; padding: 0; }
.lcat-facets li a {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.15rem 0;
  text-decoration: none;
}
.lcat-facets li a:hover .lcat-facet-value { text-decoration: underline; }
.lcat-results { list-style: none; margin: 0; padding: 0; }
.lcat-results > li { padding: 0.75rem 0; border-bottom: 1px solid var(--lcat-border); }
.lcat-card-title { margin: 0 0 0.25rem; font-size: 1.1rem; }
.lcat-subtitle { font-weight: 400; color: var(--lcat-muted); }
.lcat-contribs { margin: 0.15rem 0; color: var(--lcat-muted); }
.lcat-role { font-style: italic; }
.lcat-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.35rem 0 0; padding: 0; }
.lcat-tags li {
  font-size: 0.8rem;
  background: #eef2f7;
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
}
.lcat-terms { list-style: none; padding: 0; columns: 2; }
.lcat-editions { list-style: none; padding: 0; }
.lcat-edition { padding: 0.5rem 0; border-bottom: 1px dashed var(--lcat-border); }
.lcat-format { font-weight: 600; text-transform: capitalize; margin-right: 0.5rem; }
.lcat-isbn { color: var(--lcat-muted, #667); }
/* Live availability (tasks/004): color by resolved data-status; empty (unknown or
   not-yet-fetched) stays invisible so it never shows a misleading state. */
.lcat-availability { margin-left: 0.5rem; font-size: 0.9em; }
.lcat-availability:empty { display: none; }
.lcat-availability[data-status="available"] { color: #1a7f37; }
.lcat-availability[data-status="holdable"] { color: #9a6700; }
.lcat-availability[data-status="unavailable"] { color: #8b1a1a; }
.lcat-meta dt { font-weight: 600; }
.pagination { list-style: none; display: flex; gap: 0.5rem; padding: 0; margin: 1.5rem 0; }
