/* ==========================================================================
   Maker index, and the sources under a record

   Makers are the site's subject, so the index is set as a reading list rather
   than a grid of cards with rules and rounded corners — the density belongs to
   the census, not here. Each entry carries a source count, which is the honest
   measure of how much is actually behind it: two records with the same number
   of claims can be worlds apart, one built on parish registers and federal
   award lists, the other on a directory line the maker filled in himself.
   ========================================================================== */

.bb-makerindex {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
	gap: 1.75rem 2.25rem;
	margin-block: 2rem;
}

.bb-makercard {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding-block-start: 0.75rem;
	border-block-start: 2px solid var(--wp--preset--color--contrast, currentColor);
}

.bb-makercard__name {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.25;
}

.bb-makercard__name a { text-decoration: none; }
.bb-makercard__name a:hover { text-decoration: underline; }

.bb-makercard__dates {
	margin: 0;
	font-variant-numeric: tabular-nums;
	color: var(--bb-quiet, inherit);
	font-size: 0.9rem;
}

.bb-makercard__craft,
.bb-makercard__place,
.bb-makercard__weight {
	margin: 0;
	font-size: 0.82rem;
	color: var(--bb-quiet, inherit);
}

.bb-makercard__weight {
	margin-block-start: 0.35rem;
	font-variant-numeric: tabular-nums;
}

/* --- What a record rests on ------------------------------------------- */

.bb-recordsources {
	margin-block-start: 2.5rem;
	padding-block-start: 1.25rem;
	border-block-start: 1px solid var(--bb-rule, currentColor);
}

.bb-recordsources h2 { margin-block: 0 0.4rem; }

.bb-recordsources__lede {
	margin-block: 0 1.25rem;
	color: var(--bb-soft, inherit);
	font-size: 0.95rem;
}

.bb-recordsources__list {
	margin: 0;
	padding-inline-start: 1.4rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.bb-recordsources__list li { }

.bb-recordsources__cite { display: block; }

.bb-recordsources__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	margin-block-start: 0.35rem;
}

.bb-tag {
	font-size: 0.68rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 0.1rem 0.4rem;
	border: 1px solid var(--bb-rule, currentColor);
	border-radius: 2px;
	color: var(--bb-quiet, inherit);
	white-space: nowrap;
}

/* A primary source is worth seeing at a glance; an unread one even more so. */
.bb-tag--primary { border-color: var(--bab-documented); color: var(--bab-documented); }
.bb-tag--unclear { border-color: var(--bab-disputed);   color: var(--bab-disputed); }

.bb-recordsources__link {
	font-size: 0.75rem;
	white-space: nowrap;
}

/* --- Source index ------------------------------------------------------ */

.bb-sourceindex__head {
	display: flex;
	align-items: baseline;
	gap: 0.6rem;
	margin-block: 2rem 0.5rem;
	padding-block-end: 0.35rem;
	border-block-end: 1px solid var(--bb-rule, currentColor);
}

.bb-sourceindex__n {
	font-size: 0.8rem;
	font-variant-numeric: tabular-nums;
	color: var(--bb-quiet, inherit);
}

.bb-sourceindex__note {
	font-size: 0.9rem;
	color: var(--bb-soft, inherit);
}

.bb-sourceindex__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.bb-sourceindex__list li {
	padding-inline-start: 1.1rem;
	text-indent: -1.1rem;   /* hanging indent, as a bibliography sets */
}

.bb-sourceindex__list a { text-decoration: none; }
.bb-sourceindex__list a:hover { text-decoration: underline; }

/* An unresolved citation is a defect, and is styled as one — visible, but not
   shouting. It should look like something to be fixed, not like a feature. */
.bb-recordsources__missing code {
	font-size: 0.9rem;
	opacity: 0.85;
}

.bb-recordsources__warn {
	margin: 0.35rem 0 0;
	font-size: 0.82rem;
	color: var(--bab-disputed, inherit);
}

/* --- Mentions ----------------------------------------------------------
   Two sections from class-bb-mentions.php. On a source page, "Everyone
   this source names" follows "What rests on this source", and the styling
   has one job: keep the weak thing looking weaker than the strong thing.
   Claims above get citation-weight type; mentions get a dense, quiet list
   — closer to the census table than to a bibliography — so four hundred
   names read as an index of a document, not as four hundred endorsements.
   On a maker page, "Mentioned, not yet worked" is the same data from the
   other end, and there it is a to-do list shown in public on purpose. */

.bb-mentions,
.bb-mentionedin {
	margin-block-start: 2.5rem;
	padding-block-start: 1.25rem;
	border-block-start: 1px solid var(--bb-rule, currentColor);
}

.bb-mentions h2,
.bb-mentionedin h2 { margin-block: 0 0.4rem; }

.bb-mentions__lede,
.bb-mentionedin__lede {
	margin-block: 0 1.25rem;
	color: var(--bb-soft, inherit);
	font-size: 0.95rem;
}

.bb-mentions__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.bb-mentions__row {
	padding-block-end: 0.6rem;
	border-block-end: 1px solid var(--bb-rule, transparent);
}

.bb-mentions__name { font-weight: 600; }
a.bb-mentions__name { text-decoration: none; }
a.bb-mentions__name:hover { text-decoration: underline; }

.bb-mentions__loc {
	font-size: 0.8rem;
	font-variant-numeric: tabular-nums;
	color: var(--bb-muted, inherit);
	white-space: nowrap;
}

/* The note is the source's own words, so it is set like quoted matter:
   smaller, quieter, and visually subordinate to the name it attests. */
.bb-mentions__note {
	margin: 0.2rem 0 0;
	font-size: 0.85rem;
	color: var(--bb-soft, inherit);
}

/* A name with no record is the invitation, and gets the accent — the one
   place in these sections allowed to ask for the reader's eye. */
.bb-tag--gap {
	border-color: var(--bb-accent, currentColor);
	color: var(--bb-accent, inherit);
}

.bb-mentionedin__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.bb-mentionedin__list li { }

.bb-mentionedin__cite a { text-decoration: none; }
.bb-mentionedin__cite a:hover { text-decoration: underline; }

.bb-mentionedin__as {
	display: block;
	margin-block-start: 0.15rem;
	font-size: 0.82rem;
	color: var(--bb-muted, inherit);
}

/* ==========================================================================
   The index front — search, then a random cut

   The full alphabetical wall is gone: at 4,887 records one page cannot be
   the index, so the page is a finding aid instead. The search is the tool
   and gets the top; the sample underneath reuses .bb-makercard unchanged,
   because a search result and a sampled record are the same thing and
   should look it. No colour is defined here — tokens from the theme and
   bb-library.css only, same rule as bb-front.css.
   ========================================================================== */

.bb-makersearch {
	margin-block: 2rem 2.75rem;
	padding-block-start: 1.25rem;
	border-block-start: 2px solid var(--wp--preset--color--contrast, currentColor);
}

.bb-makersearch__label {
	display: block;
	margin-block-end: 0.5rem;
	font-family: var(--wp--preset--font-family--label);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-4, var(--bb-muted, currentColor));
}

.bb-makersearch__input {
	width: 100%;
	max-width: 34rem;
	padding: 0.6rem 0.85rem;
	font: inherit;
	font-size: 1.05rem;
	color: inherit;
	background: transparent;
	border: 1px solid var(--bb-rule, currentColor);
	border-radius: 2px;
}

.bb-makersearch__input:focus-visible {
	outline: none;
	border-color: var(--wp--preset--color--contrast, currentColor);
}

.bb-makersearch__status {
	margin: 0.6rem 0 0;
	font-size: 0.9rem;
	color: var(--bb-soft, inherit);
	min-height: 1.4em;   /* the line reserves its space, so answers do not jump the page */
}

.bb-makersearch__noscript {
	margin: 0.6rem 0 0;
	font-size: 0.9rem;
	color: var(--bb-soft, inherit);
}

/* Draft matches: names and standing only, set quiet — the point is that
   they exist, not that they invite reading. Nothing here is a link. */
.bb-searchdrafts {
	margin-block-start: 1.75rem;
	padding-block-start: 1rem;
	border-block-start: 1px solid var(--bb-rule, currentColor);
}

.bb-searchdrafts__note,
.bb-searchdrafts__more {
	margin: 0 0 0.6rem;
	font-size: 0.9rem;
	color: var(--bb-soft, inherit);
}

.bb-searchdrafts__more { margin: 0.6rem 0 0; }

.bb-searchdrafts__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.bb-searchdrafts__name { font-weight: 600; }

/* --- The sample --------------------------------------------------------- */

.bb-makersample__head {
	margin-block: 0 0.4rem;
}

.bb-makersample__lede {
	margin-block: 0 0.5rem;
	color: var(--bb-soft, inherit);
	font-size: 0.95rem;
}

/* ==========================================================================
   No rails

   Every list and note in this file used to carry its own ch-based cap — 62,
   66, 70, 74, 76 — set when the components lived in a reading column. They
   now sit inside an alignwide container that already decides the measure, so
   the caps did nothing but hold text short of the box it was in: on the
   sources index the section rule ran the full width while the citations
   stopped 160px shy of it, which reads as an unfinished layout rather than a
   considered one.

   The container sets the measure. A component inside it fills what it is
   given, and matches every other component given the same box.
   ========================================================================== */
