/*
 * Hot Topics: everything is scoped to .ht-outlines so it can't leak into your theme.
 * Backgrounds are always transparent; text color and font come from your theme.
 */
.ht-outlines {
	--ht-accent: #7a1f1f;
	--ht-offset: 20px;
	--ht-cols: 2;
	--ht-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(--ht-offset);
}
.ht-outlines *,
.ht-outlines *::before,
.ht-outlines *::after { box-sizing: border-box; }

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

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

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

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

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

/* ---- topics ---- */
.ht-outlines .topic { margin: 0; padding: 0; scroll-margin-top: var(--ht-offset); }
.ht-outlines .topic-label { margin: 0 0 .3em; color: var(--ht-accent); font-size: .8em; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.ht-outlines .topic-title { margin: 0 0 .8em; padding: 0; font-size: 2em; font-weight: 700; line-height: 1.15; border: 0; }
.ht-outlines .topic h3 { margin: 2em 0 .8em; padding: 0 0 .25em; color: var(--ht-accent); font-size: 1.05em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.25; border: 0; border-bottom: 1px solid var(--ht-rule); }
.ht-outlines .topic p { margin: .7em 0; }
.ht-outlines .topic ul { list-style: disc; margin: .3em 0 .6em; padding-left: 1.4em; }
.ht-outlines .topic ul.context { margin-top: 0; }
.ht-outlines .topic li { margin: .6em 0; padding: 0; }
.ht-outlines .topic .ref { color: var(--ht-accent); font-weight: 700; }
.ht-outlines ol.questions { list-style: decimal; margin: 0; padding-left: 1.6em; }
.ht-outlines ol.questions > li { margin: 1.1em 0; padding-left: .3em; }
.ht-outlines ol.questions > li::marker { color: var(--ht-accent); font-weight: 700; }
.ht-outlines ol.questions p { margin: 0; }
.ht-outlines ol.questions p.q { font-weight: 700; }
.ht-outlines ol.questions p.note { margin-top: .35em; opacity: .75; }
.ht-outlines p.pitfall { margin: 1.8em 0 0; padding: .7em 1em; border-left: 3px solid var(--ht-accent); }
.ht-outlines p.pitfall strong { color: var(--ht-accent); }
.ht-outlines ol.sources { list-style: decimal; margin: 0; padding-left: 2em; font-size: .95em; }
.ht-outlines ol.sources li { margin: .45em 0; padding-left: .2em; overflow-wrap: anywhere; }
.ht-outlines ol.sources a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ht-outlines ol.sources a:hover,
.ht-outlines ol.sources a:focus-visible { color: var(--ht-accent); }
.ht-outlines p.srcnote { margin-top: 1.2em; font-size: .9em; opacity: .75; }

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

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

@media (max-width: 640px) {
	.ht-outlines .ht-contents ol { column-count: 1; }
	.ht-header { flex-direction: column-reverse; align-items: flex-start; }
	.ht-outlines .ht-title { font-size: 1.8em; }
}

@media print {
	.ht-outlines p.back { display: none; }
	.ht-outlines .topic h3 { break-after: avoid; }
	.ht-outlines ol.questions > li { break-inside: avoid; }
}
