*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-size: 16px;
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-weight: 300;
	background: #fff;
	color: #333;
	line-height: 1.8;
}

a {
	color: inherit;
}

.container {
	max-width: 640px;
	margin: 0 auto;
	padding: 0 2rem;
}

/* Minimal header */

header.book-header {
	padding: 3rem 0 2.5rem;
}

header.book-header .back-link {
	display: inline-block;
	font-size: 0.8rem;
	color: #999;
	text-decoration: none;
	margin-bottom: 1.5rem;
}

header.book-header .back-link:hover {
	color: #4f81bd;
}

header.book-header .book-title {
	display: block;
	font-size: 0.8rem;
	font-weight: 400;
	letter-spacing: 0.13em;
	color: #999;
	text-transform: uppercase;
}

/* Reading column */

main {
	padding-bottom: 3rem;
}

main .container h1 {
	font-family: 'DM Serif Display', Georgia, 'Times New Roman', serif;
	font-weight: 400;
	font-size: 2.1rem;
	color: #1a1a1a;
	letter-spacing: -0.01em;
	margin-bottom: 1.75rem;
}

main .container h2 {
	font-family: 'DM Serif Display', Georgia, 'Times New Roman', serif;
	font-weight: 400;
	font-style: italic;
	font-size: 1.4rem;
	color: #1a1a1a;
	margin: 2.75rem 0 1.25rem;
}

main .container h3 {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-weight: 600;
	font-size: 1.05rem;
	color: #1a1a1a;
	margin: 2.25rem 0 1rem;
}

main .container p {
	font-size: 1rem;
	color: #333;
	margin-bottom: 1.4rem;
	max-width: 40rem;
}

main .container ul, main .container ol {
	margin: 0 0 1.4rem 1.3rem;
}

main .container li {
	font-size: 1rem;
	color: #333;
	margin-bottom: 0.9rem;
	max-width: 38rem;
}

main .container li p {
	margin-bottom: 0;
}

main .container em, main .container i {
	font-style: italic;
}

figure {
	margin: 2rem 0;
	text-align: center;
}

figure img {
	max-width: 100%;
	height: auto;
}

/* Tables */

table.book-table {
	width: 100%;
	border-collapse: collapse;
	margin: 2rem 0;
	font-size: 0.9rem;
	font-variant-numeric: tabular-nums;
}

table.book-table th,
table.book-table td {
	text-align: left;
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid #ececec;
}

table.book-table th {
	font-weight: 400;
	color: #777;
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

table.book-table td:not(:first-child),
table.book-table th:not(:first-child) {
	text-align: right;
}

table.book-table tr.section-row th {
	text-align: left;
	padding-top: 1.1rem;
	color: #4f81bd;
}

table.book-table tr.subtotal-row td {
	font-style: italic;
	color: #555;
}

table.book-table tr.total-row td {
	font-weight: 600;
	color: #1a1a1a;
	border-top: 1px solid #ccc;
	border-bottom: none;
}

/* Text-heavy tables (role dispositions, etc.) — new for TailorStrength.
   The base table right-aligns every column but the first, which suits
   Combined Structure's numeric tables but not a table whose later
   columns are descriptive sentences. */

table.book-table--text td,
table.book-table--text th {
	text-align: left;
	vertical-align: top;
}

main .container .table-caption {
	font-size: 0.85rem;
	font-style: italic;
	color: #777;
	margin: -1.5rem 0 2rem;
}

main .container .equation {
	text-align: center;
	font-size: 1.05rem;
	color: #1a1a1a;
	line-height: 1.7;
	margin: 1.5rem 0 2rem;
}

main .container .deal-summary p {
	margin-bottom: 0.4rem;
	font-size: 0.95rem;
	max-width: none;
}

main .container .deal-summary p strong {
	font-weight: 600;
}

/* Process flow diagrams — new for TailorStrength, in place of the
   Mermaid diagrams the wiki source uses. The site has no JavaScript
   anywhere else, and a rendered flowchart image would need a build
   step this static site doesn't have, so the same information is
   shown instead as a simple connected step list, styled to match the
   rest of the book rather than looking like an embedded diagram. */

figure.process-diagram {
	margin: 2.5rem 0;
}

ol.process-flow {
	list-style: none;
	margin: 0;
	padding: 0;
	border-left: 2px solid #ececec;
}

ol.process-flow li {
	position: relative;
	padding: 0 0 1.5rem 1.75rem;
	font-size: 0.92rem;
	color: #333;
}

ol.process-flow li::before {
	content: '';
	position: absolute;
	left: -7px;
	top: 0.3rem;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #4f81bd;
}

ol.process-flow li:last-child {
	padding-bottom: 0;
}

ol.process-flow .step-branch {
	display: block;
	margin-top: 0.4rem;
	font-size: 0.85rem;
	font-style: italic;
	color: #777;
}

ol.process-flow .step-branch::before {
	content: '↳ ';
}

figure.process-diagram figcaption {
	font-size: 0.85rem;
	font-style: italic;
	color: #777;
	margin-top: 1rem;
}

/* Prev/next */

nav.book-nav {
	border-top: 1px solid #ececec;
	padding-top: 1.5rem;
	margin-top: 1rem;
	font-size: 0.85rem;
}

nav.book-nav .container {
	display: flex;
	justify-content: space-between;
}

nav.book-nav a {
	color: #4f81bd;
	text-decoration: none;
}

nav.book-nav a:hover {
	text-decoration: underline;
}

nav.book-nav .nav-spacer {
	color: #ccc;
}

@media (max-width: 540px) {
	.container {
		padding: 0 1.5rem;
	}

	main .container h1 {
		font-size: 1.8rem;
	}

	table.book-table {
		font-size: 0.8rem;
	}
}
