/*
 * Bible Outlines: everything is scoped to .bo-outlines so it can't leak into your theme.
 * Backgrounds are always transparent; text color and font come from your theme.
 */
.bo-outlines {
	--bo-accent: #7a1f1f;
	--bo-heading: #1f4e8c;
	--bo-offset: 20px;
	--bo-cols: 2;
	--bo-rule: rgba(128, 128, 128, .4);
	background: transparent;
	color: inherit;
	font-family: inherit;
	font-size: 1em;
	line-height: 1.55;
	text-align: left;
	scroll-margin-top: var(--bo-offset);
}
.bo-outlines *,
.bo-outlines *::before,
.bo-outlines *::after { box-sizing: border-box; }

/* Never let a theme paint a background (striped tables, zebra rows, hover fills, etc.). */
.bo-outlines,
.bo-outlines * {
	background: transparent !important;
	background-image: none !important;
	box-shadow: none;
}
.bo-outlines a { box-shadow: none; }

/* ---- headings: neutralise theme styling, then set our own ---- */
.bo-outlines h2,
.bo-outlines h3,
.bo-outlines h4,
.bo-outlines h5,
.bo-outlines p,
.bo-outlines ul,
.bo-outlines ol,
.bo-outlines dl,
.bo-outlines dt,
.bo-outlines dd {
	font-family: inherit;
	color: inherit;
	text-transform: none;
	letter-spacing: normal;
	text-indent: 0;
	float: none;
	clear: none;
}

/* ---- optional header ---- */
.bo-header { display: flex; align-items: center; gap: 1.5em; margin: 0 0 1.5em; padding-top: 1em; border-top: 3px solid var(--bo-accent); }
.bo-header-text { flex: 1; }
.bo-outlines .bo-title { margin: 0; font-size: 2.2em; font-weight: 700; line-height: 1.1; }
.bo-outlines .bo-tagline { margin: .35em 0 .2em; font-style: italic; opacity: .75; font-size: 1.1em; }
.bo-outlines .bo-by { margin: 0; opacity: .75; font-size: .95em; }
.bo-outlines .bo-by b { color: var(--bo-accent); opacity: 1; }
.bo-outlines img.bo-cover { flex: none; width: 150px; max-width: 30%; height: auto; border: 0; border-radius: 0; margin: 0; }

/* ---- contents ---- */
.bo-outlines .bo-contents { margin: 0 0 1em; }
.bo-outlines .bo-contents-title { margin: 0 0 .6em; font-size: 1.5em; font-weight: 700; line-height: 1.2; }
.bo-outlines .bo-groups > .bo-group + .bo-group { margin-top: 1.5em; }
.bo-outlines .bo-group-title { margin: 0 0 .3em; padding-bottom: .25em; color: var(--bo-accent); font-size: 1.05em; font-weight: 700; border-bottom: 1px solid var(--bo-rule); }
.bo-outlines .bo-contents ol { list-style: none; margin: 0; padding: 0; column-count: var(--bo-cols); column-gap: 2.5em; }
.bo-outlines .bo-contents li { break-inside: avoid; margin: 0; padding: 0; list-style: none; }
.bo-outlines .bo-contents li::marker { content: none; }
.bo-outlines .bo-contents a { display: flex; align-items: baseline; gap: .7em; padding: .2em .4em; color: inherit; text-decoration: none; border: 0; border-radius: 4px; }
.bo-outlines .bo-contents a:hover,
.bo-outlines .bo-contents a:focus-visible { color: var(--bo-accent); text-decoration: underline; }
.bo-outlines .bo-n { flex: none; width: 1.7em; color: var(--bo-accent); font-size: .8em; text-align: right; }

/* ---- logo: bottom left of the index, 2 inches wide ---- */
.bo-outlines .bo-logo { margin: 2.2em 0 0; text-align: left; }
.bo-outlines .bo-logo a { display: inline-block; line-height: 0; text-decoration: none; border: 0; }
.bo-outlines .bo-logo img { display: block; width: 2in; max-width: 100%; height: auto; margin: 0; padding: 0; border: 0; border-radius: 0; }

/* ---- books ---- */
.bo-outlines .book { margin-top: 2.4em; padding-top: 2.2em; border-top: 2px solid var(--bo-rule); scroll-margin-top: var(--bo-offset); }
.bo-outlines .bo-books > .book:first-child { margin-top: 1.5em; }
/* one-book view: the book is the whole page, so no divider rule above it */
.bo-outlines.bo-view-book .bo-books > .book { margin-top: 0; padding-top: 0; border-top: 0; }
.bo-outlines .book-title { margin: 0; padding: 0; font-size: 2em; font-weight: 700; line-height: 1.15; border: 0; }
.bo-outlines .subtitle { margin: .2em 0 0; font-style: italic; opacity: .75; }
.bo-outlines .book h3 { margin: 2em 0 .8em; padding: 0 0 .25em; color: var(--bo-accent); font-size: 1.3em; font-weight: 700; line-height: 1.25; border: 0; border-bottom: 1px solid var(--bo-rule); }
.bo-outlines .book h4 { margin: 1.3em 0 .4em; padding: 0; font-size: 1.05em; font-weight: 700; line-height: 1.3; }
.bo-outlines .book p { margin: .5em 0; }
.bo-outlines .book ul { list-style: disc; margin: .3em 0 .6em; padding-left: 1.4em; }
.bo-outlines .book li { margin: .3em 0; padding: 0; }

/* ---- structural-outline tables ---- */
.bo-outlines table.outline { width: 100%; margin: .8em 0 1em; font-size: .95em; border-collapse: collapse; border: 0; table-layout: auto; }
.bo-outlines table.outline th,
.bo-outlines table.outline td { padding: .4em .6em; border: 0; border-bottom: 1px solid var(--bo-rule); text-align: left; vertical-align: top; font-size: inherit; color: inherit; }
.bo-outlines table.outline thead th { border-bottom: 2px solid var(--bo-rule); }
.bo-outlines table.outline tbody th { width: 9em; white-space: nowrap; font-weight: 700; }
.bo-outlines table.outline tr.sub th { padding-left: 1.5em; }
.bo-outlines table.outline tr.grp td { font-weight: 700; }

/* ---- section-by-section skeleton ---- */
.bo-outlines .chap { display: grid; grid-template-columns: 3em 1fr; gap: 0 .8em; margin: 1.5em 0; }
.bo-outlines .chap .num { color: var(--bo-accent); font-size: 2em; font-weight: 700; line-height: 1.05; text-align: right; }
.bo-outlines .chap h5 { margin: 0; padding: 0; color: var(--bo-heading); font-size: 1.08em; font-weight: 700; line-height: 1.4; }
.bo-outlines .chap h5 strong,
.bo-outlines .chap h5 b { color: inherit; }
.bo-outlines .chap .sum { margin: .1em 0 .45em; font-style: italic; opacity: .75; }
.bo-outlines dl.refs { display: grid; grid-template-columns: 5.6em 1fr; gap: .3em .8em; margin: 0; padding: 0; }
.bo-outlines dl.refs dt { margin: 0; padding: 0; color: var(--bo-accent); font-weight: 700; }
.bo-outlines dl.refs dd { margin: 0; padding: 0; }

/* ---- Back to top ---- */
.bo-outlines p.back { margin: 2em 0 0; text-align: right; font-size: .95em; }
.bo-outlines p.back a { display: inline-block; padding: .3em .9em; color: var(--bo-accent); text-decoration: none; border: 1px solid var(--bo-rule); border-radius: 999px; }
.bo-outlines p.back a:hover,
.bo-outlines p.back a:focus-visible { text-decoration: underline; border-color: var(--bo-accent); }
.bo-outlines a:focus-visible { outline: 2px solid var(--bo-accent); outline-offset: 2px; }

.bo-outlines .bo-notice { padding: .6em .9em; border: 1px dashed var(--bo-rule); font-size: .9em; }

@media (max-width: 640px) {
	.bo-outlines .bo-contents ol { column-count: 1; }
	.bo-header { flex-direction: column-reverse; align-items: flex-start; }
	.bo-outlines .bo-title { font-size: 1.8em; }
	.bo-outlines .chap { grid-template-columns: 2.2em 1fr; gap: 0 .5em; }
	.bo-outlines .chap .num { font-size: 1.5em; }
	.bo-outlines dl.refs { grid-template-columns: 4.6em 1fr; gap: .3em .6em; }
	.bo-outlines table.outline tbody th { width: 6.5em; }
}

@media print {
	.bo-outlines .book { break-before: page; border-top: 0; margin-top: 0; padding-top: 0; }
	.bo-outlines p.back { display: none; }
	.bo-outlines .chap,
	.bo-outlines table.outline tr,
	.bo-outlines dl.refs dt,
	.bo-outlines dl.refs dd { break-inside: avoid; }
	.bo-outlines .book h3,
	.bo-outlines .book h4 { break-after: avoid; }
}
