/* 06-components/search — the search surface as a live prompt and its stdout. The
   field is the whole hero; results are grouped, scannable mono stdout, each row
   tagged by kind so what matched reads at a glance. Composes .c-group for the
   section markers, .c-tag for the kind labels, and mirrors the catalogue ledger
   rhythm (rule-separated rows) so the site reads as one machine. */

/* The prompt field: the query input flush with its run button on one bar. The
   input flexes; the button holds its size. Stays a single bar on a phone. */
.c-search__bar {
  display: flex;
  gap: var(--space-sm);
  align-items: stretch;
}
.c-search__bar .c-field {
  flex: 1 1 auto;
  min-width: 0;
}
.c-search__bar .c-btn {
  flex: none;
  align-self: end;
}

/* Results as terminal stdout: a rule-separated mono list per kind group. */
.c-result-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.c-result-list > li {
  padding-block: var(--space-sm);
  border-block-start: 1px solid var(--rule);
}
.c-result-list > li:first-child {
  border-block-start: 0;
  padding-block-start: 0;
}

/* A single row: the kind tag, then the title over its dim context. min-width:0
   lets the context clamp/truncate inside the flex row rather than overflowing. */
.c-result {
  display: flex;
  gap: var(--space-sm);
  align-items: baseline;
}
.c-result__tag { flex: none; }
.c-result__body { min-width: 0; }
.c-result__title {
  font-family: var(--font-chrome);
  font-size: var(--text-sm);
}
/* The context sits dim beneath the title; a long excerpt clamps rather than
   blowing the row. Nullable segments simply don't render — no dangling "by". */
.c-result__context {
  color: var(--ink-dim);
  font-size: var(--text-xs);
  line-height: var(--leading-body);
  margin-block-start: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* When a group hits its cap the list is silently truncated; a quiet note says so
   rather than pretending the list is complete. */
.c-result__truncation {
  margin-block-start: var(--space-sm);
  color: var(--ink-dim);
  font-family: var(--font-chrome);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
