/*
 * Reveg field guides — the guide page, species pages, and the guide's PDF.
 *
 * Print keeps the structure of the Rocky Mountain Research Station field
 * guides (RMRS-GTR-10, Field Guide to Intermountain Sedges): labelled
 * sections, indented keys with dot leaders, figure pages facing their
 * descriptions, the report line and page number in the footer. The type is
 * Source Serif 4 for reading and Source Sans 3 for headings, labels, keys and
 * captions, both served with the plugin (fonts/, SIL Open Font License) so
 * every renderer prints the same. Static weights, not the variable fonts:
 * Chrome embeds a variable font in a PDF as Type 3 outlines, a static one as
 * TrueType.
 *
 * Page geometry and the footer text are set per guide in an inline <style>
 * (wordpress.php), because @page cannot read custom properties.
 */

@font-face { font-family: "RFG Source Serif"; src: url(fonts/source-serif-4-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: "RFG Source Serif"; src: url(fonts/source-serif-4-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: block; }
@font-face { font-family: "RFG Source Serif"; src: url(fonts/source-serif-4-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: block; }
@font-face { font-family: "RFG Source Serif"; src: url(fonts/source-serif-4-latin-600-italic.woff2) format("woff2"); font-weight: 600; font-style: italic; font-display: block; }
@font-face { font-family: "RFG Source Serif"; src: url(fonts/source-serif-4-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: block; }
@font-face { font-family: "RFG Source Serif"; src: url(fonts/source-serif-4-latin-700-italic.woff2) format("woff2"); font-weight: 700; font-style: italic; font-display: block; }
@font-face { font-family: "RFG Source Sans"; src: url(fonts/source-sans-3-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: "RFG Source Sans"; src: url(fonts/source-sans-3-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: block; }
@font-face { font-family: "RFG Source Sans"; src: url(fonts/source-sans-3-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: block; }
@font-face { font-family: "RFG Source Sans"; src: url(fonts/source-sans-3-latin-600-italic.woff2) format("woff2"); font-weight: 600; font-style: italic; font-display: block; }
@font-face { font-family: "RFG Source Sans"; src: url(fonts/source-sans-3-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: block; }
@font-face { font-family: "RFG Source Sans"; src: url(fonts/source-sans-3-latin-700-italic.woff2) format("woff2"); font-weight: 700; font-style: italic; font-display: block; }

.rfg-guide,
.rfg-species-page {
	--rfg-ink: #1a1a1a;
	--rfg-muted: #555;
	--rfg-rule: #1a1a1a;
	--rfg-link: #2f5d1e;
	--rfg-serif: C059, "Century Schoolbook", "TeX Gyre Schola", Georgia, serif;
	--rfg-sans: "Nimbus Sans", Helvetica, "Helvetica Neue", Arial, sans-serif;
	color: var(--rfg-ink);
}

/* Print renderings only (render.php): loads the print faces before printing begins. */
.rfg-font-warmup {
	position: absolute;
	top: 0;
	left: 0;
	visibility: hidden;
	font-size: 1px;
	line-height: 1;
	white-space: nowrap;
	pointer-events: none;
}
.rfg-font-warmup-text { font-family: "RFG Source Serif", serif; }
.rfg-font-warmup-ui { font-family: "RFG Source Sans", sans-serif; }
.rfg-font-warmup b { font-weight: 600; }
.rfg-font-warmup strong { font-weight: 700; }

.rfg-guide em,
.rfg-species-page em { font-style: italic; }
.rfg-authority { font-weight: normal; font-style: normal; }
.rfg-keep-space { white-space: pre; }
.rfg-print-only,
.rfg-filler,
.rfg-measure-ref,
.rfg-pageref { display: none; }

/*
 * The Species row (Beaver Builder, builder.php) sets each labelled section as
 * the label, then the field's paragraphs: the first runs on from the label.
 */
.rfg-field > p { margin: 0; }
.rfg-field > p:first-of-type { display: inline; }
.rfg-field > p + p { margin-top: .3em; }
.rfg-builder-note { margin: 1em 0; padding: .75em 1em; border: 1px dashed #b8c4b0; background: #f6f8f3; font-size: .9em; color: #4a4a4a; }

/* ---- screen ----------------------------------------------------------------- */

/*
 * On screen the guide and species pages use the site's full content width;
 * the 5.1 x 8.5 in page belongs to print only. A figure sits beside its text
 * in two columns that stack on narrow screens.
 */
@media screen {
	.rfg-guide, .rfg-species-page { line-height: 1.55; }
	.rfg-guide h2 { margin: 2.5em 0 1em; font-family: var(--rfg-sans); }
	.rfg-guide h3, .rfg-guide h4 { font-family: var(--rfg-sans); }
	.rfg-guide a, .rfg-species-page a { color: var(--rfg-link); }

	.rfg-web-intro { display: flow-root; margin: 0 0 2em; }
	.rfg-web-cover { float: right; width: 9em; margin: 0 0 1em 1.5em; }
	.rfg-web-cover img { display: block; width: 100%; height: auto; border: 1px solid #d8d8d0; }
	@media (max-width: 40em) { .rfg-web-cover { display: none; } }
	.rfg-web-authors { font-size: 1.1em; font-weight: bold; }
	.rfg-web-series { color: var(--rfg-muted); }
	.rfg-contents { margin: 2em 0; padding: 1em 1.25em; border: 1px solid #d8d8d0; background: #fafaf6; }
	.rfg-contents h2 { margin-top: 0; }
	.rfg-toc { columns: 16em; column-gap: 2em; margin: 0; padding: 0; list-style: none; }
	.rfg-toc-entry { break-inside: avoid; }
	.rfg-toc-species { padding-left: 1.25em; font-size: .95em; }
	.rfg-toc-genus { margin-top: .5em; }

	.rfg-refs { padding-left: 0; list-style: none; }
	.rfg-refs li { margin: 0 0 .5em; padding-left: 1.5em; text-indent: -1.5em; break-inside: avoid; }

	.rfg-figure { margin: 2em 0; }
	.rfg-figure-image img { display: block; width: auto; max-width: 100%; height: auto; max-height: 90vh; margin: 0 auto; }
	.rfg-figure figcaption { margin-top: .5em; font-size: .9em; color: var(--rfg-muted); }
	.rfg-figure-label { font-weight: bold; color: var(--rfg-ink); }

	.rfg-genus { margin-top: 4em; padding-top: 1em; border-top: 3px solid var(--rfg-rule); }
	.rfg-genus-header h3 { margin-bottom: .25em; font-size: 1.6em; }
	.rfg-common-names { margin: 0 0 .5em; font-weight: bold; }
	.rfg-treatment-author, .rfg-key-author { font-style: italic; color: var(--rfg-muted); }

	.rfg-species { margin-top: 3em; padding-top: 1em; border-top: 1px solid #c8c8c0; }
	.rfg-species-name { margin-bottom: .25em; font-size: 1.3em; }
	.rfg-label { text-transform: uppercase; letter-spacing: .02em; font-size: .9em; }
	.rfg-field { margin: 0 0 .75em; }
	.rfg-field-more { margin-top: -.25em; }
	/* The figure is beside or above its text on screen: no "See Figure N". */
	.rfg-figure-refs { display: none; }

	.rfg-key { margin: 2em 0; }
	.rfg-key-leads { margin: 0; padding: 0; list-style: none; }
	.rfg-lead { margin: 0 0 .5em; padding-left: calc(var(--rfg-depth, 0) * 1.25em + 1.75em); text-indent: -1.75em; }
	.rfg-lead-target { margin-left: .35em; text-indent: 0; font-weight: bold; white-space: nowrap; }
	.rfg-lead-target::before { content: "→ "; font-weight: normal; }

	.rfg-glossary-terms { columns: 18em; column-gap: 2em; }
	.rfg-term { break-inside: avoid; margin: 0 0 .6em; }
	.rfg-term dt { display: inline; font-style: italic; font-weight: bold; }
	.rfg-term dt::after { content: " — "; font-weight: normal; }
	.rfg-term dd { display: inline; margin: 0; }

	.rfg-index { columns: 12em; column-gap: 1.5em; padding: 0; list-style: none; }
	.rfg-index li { break-inside: avoid; margin: 0 0 .3em; padding-left: 1em; text-indent: -1em; }
	.rfg-index-accepted { font-weight: bold; }
	.rfg-index-note { font-size: .9em; color: var(--rfg-muted); }

	.rfg-species-page .rfg-species { margin-top: 1em; border-top: 0; }
	.rfg-breadcrumb { font-size: .9em; }
	.rfg-species-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75em 1.5em; margin: 2em 0; padding-top: 1em; border-top: 1px solid #c8c8c0; }
	.rfg-button { display: inline-block; padding: .5em 1em; border-radius: 3px; background: var(--rfg-link); color: #fff !important; text-decoration: none; }

	/*
	 * Figure beside text: species (figure, description) and genera (morphology,
	 * description). Drawn with the Species and Genus rows, their columns do it.
	 */
	.rfg-species-row .rfg-figure, .rfg-genus-row .rfg-figure { margin: 0 0 1.5em; }
	.rfg-species-row .rfg-species-header > :first-child, .rfg-genus-row .rfg-genus-header > :first-child { margin-top: 0; }
	@media (min-width: 56em) {
		.rfg-species:not(.rfg-species--no-figure):not(.rfg-species--builder),
		.rfg-genus:not(.rfg-genus--no-figures):not(.rfg-genus--builder) {
			display: grid;
			grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
			column-gap: 2.5em;
			align-items: start;
		}
		/* The description comes first in the document (it prints on the left-hand page). */
		.rfg-species > .rfg-figure { grid-column: 1; grid-row: 1; margin: 0; }
		.rfg-species > .rfg-species-text { grid-column: 2; grid-row: 1; }
		.rfg-genus > * { grid-column: 1 / -1; }
		.rfg-genus > .rfg-genus-figures { grid-column: 1; grid-row: 2; }
		.rfg-genus > .rfg-description { grid-column: 2; grid-row: 2; }
		.rfg-genus > .rfg-genus-figures--after-key { grid-row: 3; }
		.rfg-genus:has(> .rfg-genus-figures--after-key) > .rfg-key { grid-column: 2; grid-row: 3; margin-top: 0; }
		.rfg-genus-figures .rfg-figure { margin: 0 0 1.5em; }
		.rfg-species-text > .rfg-species-header > :first-child { margin-top: 0; }
	}
	/* Stacked, the figure still comes first (the rows: their columns' stacking order). */
	@media (max-width: 55.99em) {
		.rfg-species:not(.rfg-species--builder) { display: flex; flex-direction: column; }
		.rfg-species > .rfg-figure { order: -1; }
	}

	/* Running prose in two columns where the page is wide enough for them. */
	@media (min-width: 64em) {
		.rfg-inside-cover:not(.fl-row), .rfg-introduction:not(.fl-row), .rfg-refs,
		.rfg-inside-cover .fl-rich-text, .rfg-introduction .fl-rich-text { columns: 2 24em; column-gap: 3em; }
		.rfg-inside-cover > h2, .rfg-introduction > h2,
		.rfg-inside-cover .fl-rich-text > h2, .rfg-introduction .fl-rich-text > h2 { column-span: all; }
		.rfg-inside-cover > h2:first-child, .rfg-introduction > h2:first-child,
		.rfg-inside-cover .fl-rich-text > h2:first-child, .rfg-introduction .fl-rich-text > h2:first-child { margin-top: 0; }
	}
}

/* ---- print: the guide ----------------------------------------------------------- */

@media print {
	/* The guide prints its own cover and title: the theme's page title is not printed. */
	.page-template-reveg-field-guide h1:not(.rfg-title),
	.page-template-reveg-field-guide .wp-block-post-title {
		display: none !important;
	}
	/*
	 * Nothing of the theme's page template or the page builder's rows before
	 * the cover: page 1 is the cover. (Beaver Builder theme: Bootstrap
	 * container, .fl-content margins; Builder rows: their own padding.)
	 */
	.page-template-reveg-field-guide .fl-page,
	.page-template-reveg-field-guide .fl-page-content,
	.page-template-reveg-field-guide .fl-content-full,
	.page-template-reveg-field-guide .fl-content-full > .row,
	.page-template-reveg-field-guide .fl-content,
	.page-template-reveg-field-guide .fl-post,
	.page-template-reveg-field-guide .fl-post-content,
	.page-template-reveg-field-guide .fl-row-content-wrap,
	.page-template-reveg-field-guide .fl-col-content,
	.page-template-reveg-field-guide .fl-module-content {
		margin: 0 !important;
		padding: 0 !important;
		width: auto !important;
		min-height: 0 !important;
	}
	.page-template-reveg-field-guide .fl-row-fixed-width,
	.page-template-reveg-field-guide .fl-row-content,
	.page-template-reveg-field-guide .container {
		max-width: none !important;
		width: auto !important;
	}
	/*
	 * The guide page's rows, and the Species and Genus rows, print in document
	 * order, one block after another: a page break cannot fall inside a float
	 * or a flex row, so columns are undone.
	 */
	.page-template-reveg-field-guide .fl-col-group {
		display: block !important;
	}
	.page-template-reveg-field-guide .fl-col,
	.page-template-reveg-field-guide .fl-module {
		float: none !important;
		width: auto !important;
		max-width: none !important;
		margin: 0 !important;
		padding: 0 !important;
	}
	/*
	 * Nor their clearfix boxes: an empty box after a figure's page break takes
	 * the next page for itself, and the next spread's own break leaves it blank.
	 */
	.page-template-reveg-field-guide :is(.fl-row, .fl-row-content-wrap, .fl-row-content, .fl-col-group, .fl-col, .fl-col-content, .fl-module, .fl-module-content)::before,
	.page-template-reveg-field-guide :is(.fl-row, .fl-row-content-wrap, .fl-row-content, .fl-col-group, .fl-col, .fl-col-content, .fl-module, .fl-module-content)::after {
		content: none !important;
		display: none !important;
	}
	/* Bootstrap's print sheet appends every link's address; the guide's links are already words or addresses. */
	.rfg-guide a::after { content: none !important; }

	.rfg-guide {
		--rfg-text: "RFG Source Serif", C059, Georgia, serif;
		--rfg-ui: "RFG Source Sans", "Nimbus Sans", Helvetica, Arial, sans-serif;
		--rfg-accent: #2f5d1e;
		--rfg-hairline: #a9b5a3;
		--rfg-muted: #4a4a4a;
		font: 8.8pt/1.4 var(--rfg-text);
		font-kerning: normal;
		overflow-wrap: anywhere; /* a long address would make Chrome shrink every page to fit it */
		text-align: left;
		hyphens: auto;
		-webkit-hyphens: auto;
		hyphenate-limit-chars: 7 3 3;
		orphans: 2;
		widows: 2;
	}
	.rfg-guide a { color: inherit; text-decoration: none; }
	.rfg-guide p { margin: 0 0 .55em; }
	/* Beaver Builder sets bold in its Rich Text modules (.fl-builder-content .fl-rich-text strong). */
	.rfg-guide strong, .rfg-guide.fl-builder-content .fl-rich-text strong { font-weight: 600; }
	.rfg-print-only { display: block; }
	.rfg-screen-only { display: none !important; }
	.rfg-pageref { display: inline; }
	.rfg-pn { display: inline-block; min-width: 1.7em; text-align: right; font-variant-numeric: tabular-nums; }
	.rfg-pn--pending { visibility: hidden; }

	/*
	 * For the PDF's bookmarks, which Chrome takes from the laid-out headings:
	 * room above the text (at the top of a page after a break, the ascenders of
	 * a tightly set heading reach above its box, and Chrome writes the heading
	 * twice), and spaces that survive a line break (Chrome drops a collapsible
	 * space where a heading wraps: "IntermountainCyperaceae").
	 */
	.rfg-guide h1, .rfg-guide h2, .rfg-guide h3, .rfg-guide h4 {
		padding-top: .3em;
		white-space: pre-wrap;
		font-family: var(--rfg-ui);
		color: var(--rfg-ink);
		text-align: left;
		break-after: avoid;
		hyphens: manual;
	}
	/* Section titles: a green rule under a bold sans title. */
	.rfg-guide h2 {
		margin: 0 0 1em;
		padding-bottom: .3em;
		border-bottom: 1.2pt solid var(--rfg-accent);
		font-size: 15pt;
		font-weight: 700;
		line-height: 1.15;
	}
	.rfg-guide h3 { margin: 1.4em 0 .5em; font-size: 10.5pt; font-weight: 700; line-height: 1.25; }

	/* Every part that the reader turns to starts a page. */
	.rfg-inside-cover, .rfg-citation, .rfg-contents, .rfg-introduction, .rfg-references,
	.rfg-family, .rfg-genus, .rfg-key, .rfg-glossary, .rfg-index-section,
	.rfg-figure, .rfg-species-text, .rfg-filler {
		break-before: page;
	}
	/* Except a genus's key when the layout lets it follow the description (see layout.php). */
	.rfg-genus--flow .rfg-key { break-before: auto; margin-top: 2em; }
	.rfg-filler { display: block; height: 1px; }
	.rfg-descriptions-title { break-before: page; }
	.rfg-descriptions-title + .rfg-genus { break-before: avoid; }
	.rfg-guide .rfg-field > p { margin: 0; }
	.rfg-guide .rfg-field > p + p { margin-top: .25em; }

	/*
	 * Lists in two columns, headings across both (a heading set in two columns
	 * wraps at half the width: "Terms commonly used to / describe Cyperaceae
	 * species"). On a builder page the section's class is its row's, and its
	 * headings are inside a Rich Text module.
	 */
	.rfg-references > :not(h2, h3),
	.rfg-glossary > :not(h2, h3),
	.rfg-index-section > :not(h2, h3),
	.rfg-references .fl-rich-text > :not(h2, h3),
	.rfg-glossary .fl-rich-text > :not(h2, h3) { columns: 2; column-gap: .24in; }

	/* Cover */
	.rfg-cover {
		display: flex;
		flex-direction: column;
		height: 7.15in;
		text-align: left;
		break-after: page;
	}
	.rfg-cover-agency {
		margin: 0;
		padding-bottom: .6em;
		border-bottom: 1.2pt solid var(--rfg-accent);
		font: 600 7.2pt/1.2 var(--rfg-ui);
		letter-spacing: .08em;
		text-transform: uppercase;
		color: var(--rfg-accent);
	}
	.rfg-guide .rfg-title { margin: .4in 0 .16in; font: 700 21pt/1.08 var(--rfg-ui); letter-spacing: -.005em; }
	.rfg-cover-authors { margin: 0; padding: 0; list-style: none; font: 600 9pt/1.45 var(--rfg-ui); color: var(--rfg-muted); }
	.rfg-cover-art { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; margin: .15in 0; }
	.rfg-cover-art img { max-width: 100%; max-height: 4.3in; width: auto; height: auto; }
	.rfg-cover-imprint {
		display: grid;
		grid-template-columns: repeat(4, auto);
		gap: .1in;
		margin: 0;
		padding-top: .6em;
		border-top: .6pt solid var(--rfg-hairline);
		font: 6.8pt/1.3 var(--rfg-ui);
		color: var(--rfg-muted);
	}

	/* Inside cover and citation page */
	.rfg-inside-cover { font-size: 8.3pt; line-height: 1.45; }
	.rfg-inside-cover h2 { font-size: 12pt; }
	.rfg-inside-cover h2 ~ h2 { margin-top: 1.4em; }
	.rfg-cover-credit, .rfg-address { margin-top: 1.2em; font: 7.4pt/1.4 var(--rfg-ui); color: var(--rfg-muted); }
	.rfg-citation { font-size: 8.2pt; line-height: 1.45; }
	.rfg-citation-text { margin-bottom: 1.4em; padding-bottom: 1em; border-bottom: .6pt solid var(--rfg-hairline); }
	.rfg-keywords { font-size: 7.8pt; }

	/* Contents */
	.rfg-contents h2 { margin-bottom: .5em; }
	.rfg-toc-page-label { margin: 0 0 .3em; text-align: right; font: 600 6.6pt var(--rfg-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--rfg-muted); }
	.rfg-toc { columns: 2; column-gap: .24in; margin: 0; padding: 0; list-style: none; font: 7.7pt/1.34 var(--rfg-ui); }
	.rfg-toc-entry { break-inside: avoid; }
	.rfg-toc-entry a { display: flex; align-items: last baseline; }
	.rfg-toc-text { flex: 0 1 auto; }
	.rfg-toc-entry .rfg-pageref { flex: 1 0 auto; display: flex; align-items: baseline; justify-content: flex-end; }
	.rfg-toc-entry .rfg-pageref::before { content: ""; flex: 1; margin: 0 .3em; border-bottom: .8pt dotted var(--rfg-hairline); }
	.rfg-toc-genus { margin-top: .45em; padding-left: .45em; font-weight: 600; }
	.rfg-toc-species { padding-left: 1em; }

	/* References, glossary, indexes */
	.rfg-refs { margin: 0; padding: 0; list-style: none; font-size: 7.6pt; line-height: 1.4; }
	.rfg-refs li { margin: 0 0 .45em; padding-left: 1.2em; text-indent: -1.2em; break-inside: avoid; }
	.rfg-glossary-terms { margin: 0; font-size: 7.8pt; line-height: 1.4; }
	.rfg-term { margin: 0 0 .3em; padding-left: 1em; text-indent: -1em; break-inside: avoid; }
	.rfg-term dt { display: inline; font-style: italic; font-weight: 600; }
	.rfg-term dt::after { content: " — "; font-style: normal; font-weight: 400; }
	.rfg-term dd { display: inline; margin: 0; }
	.rfg-index { margin: 0; padding: 0; list-style: none; font: 7.6pt/1.45 var(--rfg-ui); }
	.rfg-index li { padding-left: 1em; text-indent: -1em; break-inside: avoid; }
	.rfg-index a { display: flex; align-items: last baseline; }
	.rfg-index .rfg-index-text { flex: 0 1 auto; }
	.rfg-index .rfg-pageref { flex: 1 0 auto; display: flex; align-items: baseline; justify-content: flex-end; }
	.rfg-index .rfg-pageref::before { content: ""; flex: 1; margin: 0 .25em; border-bottom: .8pt dotted var(--rfg-hairline); }
	.rfg-index-accepted { font-weight: 600; }
	.rfg-index-note { font: italic 7.4pt/1.4 var(--rfg-text); color: var(--rfg-muted); }

	/* Family and genus: the name in the reading face, set large; the common names in green. */
	.rfg-family > h2 .rfg-authority, .rfg-genus-header .rfg-authority { font-weight: 400; color: var(--rfg-muted); }
	.rfg-genus-header {
		margin-bottom: 1.1em;
		padding-bottom: .55em;
		border-bottom: 1.2pt solid var(--rfg-accent);
	}
	.rfg-guide .rfg-genus-header h3 { margin: 0 0 .15em; font: 600 17pt/1.12 var(--rfg-text); }
	.rfg-genus-header h3 .rfg-authority { font-size: .6em; }
	.rfg-common-names { margin: 0; font: 600 8.8pt/1.35 var(--rfg-ui); color: var(--rfg-accent); }
	.rfg-genus-synonyms { margin: .2em 0 0; font-size: 7.9pt; color: var(--rfg-muted); }
	.rfg-treatment-author, .rfg-key-author { margin: .25em 0 0; font: italic 7.9pt/1.35 var(--rfg-text); color: var(--rfg-muted); }
	.rfg-figure-refs { margin: .6em 0 0; font: italic 7.6pt/1.35 var(--rfg-ui); color: var(--rfg-muted); }

	/* Keys: sans, each couplet indented under the lead it follows, dot leaders to the taxon. */
	.rfg-key-title { margin: 0 0 .35em; font: 700 10.5pt/1.25 var(--rfg-ui); }
	.rfg-key-author { margin-bottom: .6em; }
	.rfg-key-leads { margin: .5em 0 0; padding: 0; list-style: none; font: 8pt/1.38 var(--rfg-ui); hyphens: manual; }
	.rfg-lead {
		position: relative;
		overflow: hidden;
		margin: 0 0 .32em;
		padding-left: calc(var(--rfg-depth, 0) * 1em + 1.55em);
		text-indent: -1.55em;
		break-inside: avoid;
	}
	.rfg-lead-number { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--rfg-accent); }
	/* Dot leaders: a dotted rule from the lead's last word to its taxon. */
	.rfg-lead--taxon .rfg-lead-text::after {
		content: "";
		position: absolute;
		width: 100%;
		height: .95em;
		margin-left: .35em;
		border-bottom: .8pt dotted var(--rfg-hairline);
	}
	.rfg-lead-target {
		float: right;
		position: relative;
		z-index: 1;
		padding-left: .35em;
		background: #fff !important; /* covers the leader; Bootstrap's print sheet clears backgrounds */
		text-indent: 0;
		font-weight: 600;
	}
	.rfg-lead-target .rfg-pageref { font-weight: 400; color: var(--rfg-muted); }

	/* Figures: a page each, the figure as large as the page allows. */
	.rfg-figure {
		display: flex;
		flex-direction: column;
		justify-content: center;
		height: 7.3in;
		margin: 0;
		break-after: page;
		break-inside: avoid;
	}
	.rfg-figure-image { flex: 0 1 auto; min-height: 0; display: flex; justify-content: center; }
	.rfg-figure-image img { width: auto; height: auto; max-width: 100%; max-height: 6.45in; object-fit: contain; }
	.rfg-figure figcaption {
		margin-top: .14in;
		padding-top: .07in;
		border-top: .6pt solid var(--rfg-hairline);
		font: 7.2pt/1.4 var(--rfg-ui);
		color: #333;
		hyphens: manual;
	}
	.rfg-figure-label { font-weight: 700; color: var(--rfg-ink); }
	.rfg-figure--map .rfg-figure-image img { max-height: 5in; }
	/* The map under the text before it, where its own page would be a left-hand one (layout.php). */
	.rfg-figure--map.rfg-figure--shared { height: auto; margin-top: 1.4em; break-before: auto; }
	.rfg-figure--map.rfg-figure--shared .rfg-figure-image img { max-height: 4in; }

	/*
	 * A genus's own pages, and the family's, as the layout arranges them
	 * (layout.php): set a step smaller or larger so they take fewer or more
	 * pages, or with the last morphology figure reduced under the text on its
	 * last page.
	 */
	.rfg-genus--tight .rfg-description { font-size: 8.2pt; line-height: 1.32; }
	.rfg-genus--tight .rfg-key-leads, .rfg-family--tight .rfg-key-leads { font-size: 7.6pt; line-height: 1.3; }
	.rfg-genus--tight .rfg-lead, .rfg-family--tight .rfg-lead { margin-bottom: .24em; }
	.rfg-genus--tight .rfg-key { margin-top: 1.4em; }
	.rfg-genus--loose .rfg-description { font-size: 9.2pt; line-height: 1.5; }
	.rfg-genus--loose .rfg-key-leads, .rfg-family--loose .rfg-key-leads { font-size: 8.8pt; line-height: 1.5; }
	.rfg-genus--loose .rfg-lead, .rfg-family--loose .rfg-lead { margin-bottom: .65em; }
	.rfg-genus--shared .rfg-genus-figures > .rfg-figure:last-child {
		height: auto;
		margin-top: 1.2em;
		break-before: auto;
	}
	.rfg-genus--shared .rfg-genus-figures > .rfg-figure:last-child img { max-height: 4.2in; }

	/*
	 * Species: a description on the left-hand page, its figure facing it on the
	 * right. A description the page cannot hold is set a step tighter
	 * (layout.php picks the step by measuring); one too long even for that runs
	 * onto the facing page, over its figure, reduced.
	 */
	.rfg-species-text { font-size: 8.8pt; line-height: 1.4; }
	.rfg-species-text--compact, .rfg-species--compact .rfg-species-text { font-size: 8.5pt; line-height: 1.35; }
	.rfg-species-text--dense, .rfg-species--dense .rfg-species-text { font-size: 8.2pt; line-height: 1.3; }
	.rfg-species-text--tight, .rfg-species--tight .rfg-species-text { font-size: 7.9pt; line-height: 1.26; }
	.rfg-species--shared .rfg-figure--species { height: auto; margin-top: 1.4em; break-before: auto; }
	.rfg-species--shared .rfg-figure--species img { max-height: 4.3in; }
	.rfg-species-header {
		margin: 0 0 .9em;
		padding-bottom: .5em;
		border-bottom: .6pt solid var(--rfg-hairline);
	}
	.rfg-guide .rfg-species-name { margin: 0; font: 600 12.5pt/1.2 var(--rfg-text); }
	.rfg-species-name .rfg-authority { font-size: .72em; color: var(--rfg-muted); }
	.rfg-species-header .rfg-common-names { margin: .3em 0 0; }
	.rfg-species-header .rfg-figure-refs { display: none; }
	.rfg-field { margin: 0 0 .5em; }
	.rfg-field-more { margin-top: -.25em; }
	.rfg-label {
		margin-right: .1em;
		font: 700 7.1pt/1 var(--rfg-ui);
		letter-spacing: .06em;
		text-transform: uppercase;
		color: var(--rfg-accent);
	}
}
