/**
 * Living Manual: public reading styles.
 *
 * Branded reading column: ink/amber/paper identity, Newsreader display,
 * Libre Franklin body, IBM Plex Mono for labels. 760px measure.
 */

:root {
	--lm-paper: #FAF6F0;
	--lm-paper-2: #F3ECE1;
	--lm-card: #FFFFFF;
	--lm-ink: #16324F;
	--lm-amber: #E7A33C;
	--lm-amber-ink: #B0653A;
	--lm-slate: #5B6572;
	--lm-hair: #E7DFD1;
	--lm-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
	--lm-sans: 'Libre Franklin', system-ui, -apple-system, "Segoe UI", sans-serif;
	--lm-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

body.lman-manual {
	margin: 0;
	background: var(--lm-paper);
	color: var(--lm-ink);
	font-family: var(--lm-sans);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

.lman-page {
	max-width: 780px;
	margin: 0 auto;
	padding: 2.75rem 1.25rem 5rem;
}

/* Header + search */

.lman-header {
	border-bottom: 1px solid var(--lm-hair);
	padding-bottom: 1.5rem;
	margin-bottom: 2rem;
}

.lman-title {
	font-family: var(--lm-serif);
	font-weight: 600;
	font-size: 2.1rem;
	line-height: 1.12;
	letter-spacing: -0.01em;
	margin: 0 0 1.1rem;
}

.lman-title a {
	color: inherit;
	text-decoration: none;
}

.lman-search {
	display: flex;
	gap: 0.5rem;
}

.lman-search input[type="search"] {
	flex: 1;
	padding: 0.6rem 0.85rem;
	font-size: 1rem;
	font-family: var(--lm-sans);
	border: 1px solid var(--lm-hair);
	border-radius: 8px;
	background: var(--lm-card);
	color: var(--lm-ink);
}

.lman-search input[type="search"]:focus {
	outline: 2px solid var(--lm-amber);
	outline-offset: 1px;
	border-color: var(--lm-amber);
}

.lman-search button {
	padding: 0.6rem 1.2rem;
	font-size: 1rem;
	font-family: var(--lm-sans);
	font-weight: 600;
	border: 1px solid var(--lm-ink);
	border-radius: 8px;
	background: var(--lm-ink);
	color: #fff;
	cursor: pointer;
}

.lman-search button:hover {
	background: #1d3f60;
	border-color: #1d3f60;
}

/* Table of contents */

.lman-contents h2,
.lman-results h2 {
	font-family: var(--lm-mono);
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--lm-amber-ink);
	margin: 0 0 1.1rem;
}

ol.lman-toc {
	list-style: none;
	margin: 0;
	padding: 0;
}

ol.lman-toc li {
	margin: 0;
}

ol.lman-toc > li {
	border-bottom: 1px solid var(--lm-hair);
	padding: 0.6rem 0;
}

ol.lman-toc > li > a {
	font-weight: 600;
}

ol.lman-toc ol.lman-toc {
	margin: 0.35rem 0 0 1.25rem;
}

ol.lman-toc ol.lman-toc > li {
	border-bottom: 0;
	padding: 0.15rem 0;
}

ol.lman-toc a {
	color: var(--lm-ink);
	text-decoration: none;
}

ol.lman-toc a:hover {
	color: var(--lm-amber-ink);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Search results */

ul.lman-result-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

ul.lman-result-list li {
	border-bottom: 1px solid var(--lm-hair);
	padding: 0.9rem 0;
}

.lman-result-title {
	font-weight: 600;
	color: var(--lm-ink);
	text-decoration: none;
}

.lman-result-title:hover {
	color: var(--lm-amber-ink);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.lman-result-snippet {
	margin: 0.3rem 0 0;
	color: var(--lm-slate);
	font-size: 0.95rem;
}

.lman-result-snippet mark {
	background: color-mix(in srgb, var(--lm-amber) 35%, transparent);
	color: inherit;
	padding: 0 0.12em;
	border-radius: 3px;
}

.lman-empty {
	color: var(--lm-slate);
}

/* Breadcrumb */

.lman-breadcrumb {
	font-family: var(--lm-mono);
	font-size: 0.82rem;
	color: var(--lm-slate);
	margin-bottom: 1.75rem;
}

.lman-breadcrumb a {
	color: var(--lm-slate);
	text-decoration: none;
}

.lman-breadcrumb a:hover {
	color: var(--lm-amber-ink);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.lman-crumb-sep {
	margin: 0 0.45rem;
	color: var(--lm-amber-ink);
}

/* Section body */

.lman-section-title {
	font-family: var(--lm-serif);
	font-weight: 600;
	font-size: 2rem;
	line-height: 1.15;
	letter-spacing: -0.01em;
	margin: 0 0 1.35rem;
}

.lman-body {
	font-size: 17.5px;
}

.lman-body h3 {
	font-family: var(--lm-serif);
	font-weight: 600;
	font-size: 1.4rem;
	margin: 2.1rem 0 0.75rem;
}

.lman-body h4 {
	font-family: var(--lm-serif);
	font-weight: 600;
	font-size: 1.12rem;
	margin: 1.5rem 0 0.5rem;
}

.lman-body p {
	margin: 0 0 1rem;
}

.lman-body ul,
.lman-body ol {
	margin: 0 0 1rem;
	padding-left: 1.5rem;
}

.lman-body a {
	color: var(--lm-amber-ink);
	text-underline-offset: 2px;
}

.lman-body blockquote {
	margin: 0 0 1rem;
	padding: 0.5rem 1.15rem;
	border-left: 3px solid var(--lm-amber);
	color: var(--lm-slate);
	background: var(--lm-paper-2);
	border-radius: 0 6px 6px 0;
}

.lman-body code {
	background: var(--lm-paper-2);
	border: 1px solid var(--lm-hair);
	border-radius: 4px;
	padding: 0.1em 0.35em;
	font-size: 0.9em;
	font-family: var(--lm-mono);
}

.lman-body table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.25rem;
	font-size: 0.95rem;
}

.lman-body th,
.lman-body td {
	border: 1px solid var(--lm-hair);
	padding: 0.55rem 0.7rem;
	text-align: left;
	vertical-align: top;
}

.lman-body thead th {
	background: var(--lm-paper-2);
	font-weight: 600;
}

/* Prev / next pager */

.lman-pager {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 3rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--lm-hair);
	font-size: 0.95rem;
}

.lman-pager a {
	color: var(--lm-ink);
	text-decoration: none;
	max-width: 48%;
	font-weight: 500;
}

.lman-pager a:hover {
	color: var(--lm-amber-ink);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.lman-pager-next {
	margin-left: auto;
	text-align: right;
}

/* Powered-by mark */

.lman-poweredby {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 3.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--lm-hair);
	font-family: var(--lm-mono);
	font-size: 0.74rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--lm-slate);
}

.lman-poweredby svg {
	width: 22px;
	height: 22px;
	flex: none;
}
