/**
 * The public research library: what the portal's own stylesheet has no name
 * for.
 *
 * The panel, the controls and the frame are styled by `portal.css`, which the
 * shortcode enqueues beside this file, so the library looks like the graves
 * search and the member directory rather than like a third design. Everything
 * here belongs to a list of references and to nothing else in the portal.
 *
 * Loaded on a public page, inside a theme, so every selector is kept inside
 * `.md1812-lib`.
 */

/*
 * The website caps body copy and centres it with a descendant selector that
 * reaches every paragraph inside this panel, which would turn each byline and
 * each description into a centred column adrift from its own title. Reset for
 * this widget alone, weighed to outrank the site rule rather than hope to be
 * read after it: two classes against one class and one element.
 *
 * The measure comes back further down, on the description, where it belongs.
 */
.md1812-portal.md1812-lib p,
.md1812-portal.md1812-lib ul,
.md1812-portal.md1812-lib ol,
.md1812-portal.md1812-lib li,
.md1812-portal.md1812-lib h1,
.md1812-portal.md1812-lib h2,
.md1812-portal.md1812-lib h3,
.md1812-portal.md1812-lib h4,
.md1812-portal.md1812-lib h5,
.md1812-portal.md1812-lib h6 {
	max-width: none;
	margin-inline: 0;
}

/*
 * The list carries no markers and no indent. A catalogue reads as a sequence
 * of entries, and a bullet beside a title that is already a heading is one
 * mark too many. `list-style: none` is stated with the padding because a theme
 * that supplies one supplies the other.
 */
/*
 * The results frame is a grid in `portal.css`, where it holds a row of cards.
 * The library puts one list inside it, and a list is then a single grid item
 * sized to one auto column: 323px of a 1344px frame, with every entry wrapping
 * inside it while the search panel above ran the full width. A container whose
 * display is chosen for what usually goes in it has to be restated for what
 * actually does.
 */
.md1812-portal.md1812-lib .md1812-results {
	display: block;
}

.md1812-portal.md1812-lib .md1812-lib__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.md1812-portal.md1812-lib .md1812-lib__item {
	padding: 16px 0;
	border-bottom: 1px solid var(--md-line);
}

.md1812-portal.md1812-lib .md1812-lib__item:last-child {
	border-bottom: 0;
}

/*
 * A kind heading is a list item, because it sits inside the same list as the
 * entries it introduces and taking it out would mean two lists interleaved.
 * It carries no rule of its own: the entry above it already drew one.
 */
.md1812-portal.md1812-lib .md1812-lib__group {
	padding: 28px 0 0;
	border: 0;
}

.md1812-portal.md1812-lib .md1812-lib__group:first-child {
	padding-top: 4px;
}

.md1812-portal.md1812-lib .md1812-lib__groupname {
	font-family: var(--md-serif);
	font-size: 22px;
	line-height: 1.2;
	margin: 0 0 4px;
	color: var(--md-ink);
}

.md1812-portal.md1812-lib .md1812-lib__title {
	font-family: var(--md-serif);
	font-size: 18px;
	line-height: 1.3;
	font-weight: 600;
	margin: 0 0 2px;
	color: var(--md-ink);
	max-width: 60ch;
}

/*
 * A title is a link, and it has to look like one without an underline running
 * through the brackets of a life span. Underlined on the pointer and on the
 * keyboard, both, because a reader moving by Tab needs the same signal.
 */
.md1812-portal.md1812-lib .md1812-lib__title a {
	color: inherit;
	text-decoration: none;
}

.md1812-portal.md1812-lib .md1812-lib__title a:hover,
.md1812-portal.md1812-lib .md1812-lib__title a:focus-visible {
	text-decoration: underline;
}

.md1812-portal.md1812-lib .md1812-lib__meta {
	margin: 0 0 4px;
	font-size: 13px;
	color: var(--md-muted);
}

.md1812-portal.md1812-lib .md1812-lib__desc {
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
	color: var(--md-text);
	/*
	 * The reading measure, counted in characters because that is what is being
	 * limited. See the note in portal.css: `ch` is the width of a zero and this
	 * typeface sets a zero wide, so 68 of them is about 85 characters.
	 */
	max-width: 68ch;
}

.md1812-portal.md1812-lib .md1812-lib__alt {
	margin: 4px 0 0;
	font-size: 13px;
}

/*
 * The filter row is three controls rather than the graves search's four, and
 * on a telephone they stack. Stated here because the base row is written for a
 * panel that always has something to its right.
 */
@media (max-width: 700px) {
	.md1812-portal.md1812-lib .md1812-filters__row {
		display: block;
	}

	.md1812-portal.md1812-lib .md1812-filters__row .md1812-field + .md1812-field {
		margin-top: 12px;
	}
}
