@charset "UTF-8";
/* TPRM Way — the site design. Black and white, like the books.
   Order: tokens, fonts, reset, layout, header, footer, typography,
   code, callouts, tables, cards, chapter navigation, forms, print. */

/* ---------------------------------------------------------------- fonts */
@font-face {
	font-family: "Inter TPRM";
	src: url("../fonts/Inter-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Inter TPRM";
	src: url("../fonts/Inter-SemiBold.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Inter TPRM";
	src: url("../fonts/Inter-Bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Source Serif TPRM";
	src: url("../fonts/SourceSerif4-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Source Serif TPRM";
	src: url("../fonts/SourceSerif4-It.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: "Source Serif TPRM";
	src: url("../fonts/SourceSerif4-Semibold.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "JetBrains TPRM";
	src: url("../fonts/JetBrainsMono-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

/* --------------------------------------------------------------- tokens */
:root {
	--sans: "Inter TPRM", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--serif: "Source Serif TPRM", Georgia, "Times New Roman", serif;
	--mono: "JetBrains TPRM", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

	--bg: #ffffff;
	--bg-soft: #f4f4f2;
	--bg-code: #f5f5f3;
	--bg-invert: #111111;
	--ink: #111111;
	--ink-2: #33312e;
	--ink-3: #5b5854;
	--ink-invert: #ffffff;
	--rule: #d7d5d1;
	--rule-strong: #111111;
	--link: #111111;
	--link-underline: #8d8a85;
	--focus: #111111;
	--shadow: rgba(17, 17, 17, 0.08);

	--measure: 68ch;
	--wide: 78rem;
	--gap: clamp(1rem, 0.6rem + 1.6vw, 2rem);
	--step: clamp(2rem, 1.2rem + 3vw, 3.5rem);

	--text: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
	--small: clamp(0.875rem, 0.84rem + 0.15vw, 0.9375rem);
	--h1: clamp(2rem, 1.4rem + 2.6vw, 3.1rem);
	--h2: clamp(1.375rem, 1.15rem + 0.9vw, 1.75rem);
	--h3: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);

	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	html:not([data-theme="light"]) {
		--bg: #101010;
		--bg-soft: #191918;
		--bg-code: #1a1a19;
		--bg-invert: #f2f0ec;
		--ink: #f4f2ee;
		--ink-2: #dedbd5;
		--ink-3: #a9a59e;
		--ink-invert: #101010;
		--rule: #3a3936;
		--rule-strong: #f4f2ee;
		--link: #f4f2ee;
		--link-underline: #8e8a83;
		--focus: #f4f2ee;
		--shadow: rgba(0, 0, 0, 0.5);

		color-scheme: dark;
	}
}

html[data-theme="dark"] {
	--bg: #101010;
	--bg-soft: #191918;
	--bg-code: #1a1a19;
	--bg-invert: #f2f0ec;
	--ink: #f4f2ee;
	--ink-2: #dedbd5;
	--ink-3: #a9a59e;
	--ink-invert: #101010;
	--rule: #3a3936;
	--rule-strong: #f4f2ee;
	--link: #f4f2ee;
	--link-underline: #8e8a83;
	--focus: #f4f2ee;
	--shadow: rgba(0, 0, 0, 0.5);

	color-scheme: dark;
}

html[data-theme="light"] {
	color-scheme: light;
}

/* ---------------------------------------------------------------- reset */
*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--serif);
	font-size: var(--text);
	line-height: 1.6;
	overflow-wrap: break-word;
}

img,
picture,
svg {
	max-width: 100%;
	height: auto;
	display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--sans);
	font-weight: 700;
	letter-spacing: -0.015em;
	line-height: 1.15;
	margin: 0 0 0.5em;
	color: var(--ink);
}

p,
ul,
ol,
dl,
figure,
table,
pre {
	margin: 0 0 1.1em;
}

a {
	color: var(--link);
	text-decoration: underline;
	text-decoration-color: var(--link-underline);
	text-underline-offset: 0.16em;
	text-decoration-thickness: 1px;
}

a:hover {
	text-decoration-color: var(--link);
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 2px;
	border-radius: 1px;
}

/* Browsers without :focus-visible still get a ring. */
:focus:not(:focus-visible) {
	outline: none;
}

::selection {
	background: var(--ink);
	color: var(--bg);
}

hr {
	border: 0;
	border-top: 1px solid var(--rule);
	margin: var(--step) 0;
}

small {
	font-size: var(--small);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* --------------------------------------------------------------- layout */
.shell {
	width: min(100% - 2rem, var(--wide));
	margin-inline: auto;
}

.prose {
	max-width: var(--measure);
}

.skip-link {
	position: absolute;
	left: 0.5rem;
	top: -4rem;
	z-index: 100;
	background: var(--bg);
	color: var(--ink);
	border: 2px solid var(--ink);
	font-family: var(--sans);
	font-size: 1rem;
	padding: 0.6rem 1rem;
	text-decoration: none;
	transition: top 0.15s ease-out;
}

.skip-link:focus {
	top: 0.5rem;
}

.site-main {
	padding-block: clamp(1.5rem, 1rem + 2vw, 3rem) var(--step);
}

/* --------------------------------------------------------------- header */
.site-header {
	border-bottom: 2px solid var(--rule-strong);
	background: var(--bg);
}

.site-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.5rem;
	padding-block: 0.85rem;
}

.brand {
	font-family: var(--sans);
	font-weight: 700;
	font-size: 1.0625rem;
	letter-spacing: 0.02em;
	text-decoration: none;
	line-height: 1.1;
	display: inline-flex;
	flex-direction: column;
	padding: 0.25rem 0;
}

.brand:hover {
	text-decoration: none;
}

.brand__name {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	border-bottom: 3px solid var(--rule-strong);
	padding-bottom: 0.15em;
}

.brand__tag {
	font-weight: 400;
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin-top: 0.35em;
}

.nav-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-left: auto;
	font-family: var(--sans);
	font-size: 0.95rem;
	font-weight: 600;
	background: var(--bg);
	color: var(--ink);
	border: 2px solid var(--ink);
	padding: 0.45rem 0.8rem;
	min-height: 44px;
	cursor: pointer;
}

.nav-toggle__bars {
	display: inline-block;
	width: 1em;
	height: 2px;
	background: currentColor;
	position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
	content: "";
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	background: currentColor;
}

.nav-toggle__bars::before {
	top: -5px;
}

.nav-toggle__bars::after {
	top: 5px;
}

.site-nav {
	width: 100%;
}

.site-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
	border-top: 1px solid var(--rule);
}

.site-nav__list a {
	display: block;
	font-family: var(--sans);
	font-size: 1rem;
	padding: 0.7rem 0.2rem;
	text-decoration: none;
	border-bottom: 1px solid var(--rule);
	min-height: 44px;
}

.site-nav__list a:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.site-nav__list a[aria-current="page"] {
	font-weight: 700;
}

.site-nav__list a[aria-current="page"]::before {
	content: "";
	display: inline-block;
	width: 0.5em;
	height: 0.5em;
	background: var(--ink);
	margin-right: 0.5em;
	vertical-align: 0.08em;
}

/* ---- navigation submenu (mobile first: nested and toggled) ---- */
.site-nav__list li.has-children {
	position: relative;
}

.site-nav__toggle {
	position: absolute;
	top: 0;
	right: 0;
	width: 44px;
	min-height: 44px;
	padding: 0;
	background: none;
	border: 0;
	border-bottom: 1px solid var(--rule);
	cursor: pointer;
	color: inherit;
}

.site-nav__chev {
	display: inline-block;
	width: 0.5em;
	height: 0.5em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translate(-2px, -2px);
	transition: transform 0.15s ease;
}

.site-nav__toggle[aria-expanded="true"] .site-nav__chev {
	transform: rotate(-135deg) translate(-2px, -2px);
}

.site-nav__list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: none;
}

.site-nav__list .sub-menu[data-open="true"] {
	display: block;
}

.site-nav__list .sub-menu a {
	padding-left: 1.1rem;
	font-size: 0.95rem;
}


.theme-switch {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.6rem 0 0.2rem;
	flex-wrap: wrap;
}

.theme-switch__label {
	font-family: var(--sans);
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.theme-switch__group {
	display: inline-flex;
	border: 1px solid var(--ink-3);
}

.theme-switch__button {
	font-family: var(--sans);
	font-size: 0.8125rem;
	font-weight: 600;
	background: transparent;
	color: var(--ink);
	border: 0;
	border-right: 1px solid var(--ink-3);
	padding: 0.4rem 0.7rem;
	min-height: 32px;
	min-width: 44px;
	cursor: pointer;
}

.theme-switch__button:last-child {
	border-right: 0;
}

.theme-switch__button[aria-pressed="true"] {
	background: var(--ink);
	color: var(--bg);
}

.theme-switch__button:hover:not([aria-pressed="true"]) {
	background: var(--bg-soft);
}

@media (min-width: 56rem) {
	.nav-toggle {
		display: none;
	}

	.site-nav {
		width: auto;
		margin-left: auto;
	}

	.site-nav[hidden] {
		display: block !important;
	}

	.site-nav__list {
		flex-direction: row;
		align-items: center;
		flex-wrap: wrap;
		row-gap: 0.35rem;
		gap: 1.25rem;
		border-top: 0;
	}

	.site-nav__list a {
		border-bottom: 0;
		padding: 0.35rem 0;
		min-height: 0;
	}

	.site-nav__list a[aria-current="page"] {
		border-bottom: 3px solid var(--ink);
	}

	.site-nav__list a[aria-current="page"]::before {
		display: none;
	}

	.theme-switch {
		padding: 0;
	}

	/* ---- navigation submenu (desktop: hover and keyboard) ---- */
	.site-nav__toggle {
		position: static;
		width: auto;
		min-height: 0;
		border-bottom: 0;
		margin-left: 0.3rem;
		vertical-align: middle;
	}

	.site-nav__list li.has-children > a {
		display: inline-block;
	}

	.site-nav__list .sub-menu {
		position: absolute;
		top: 100%;
		left: -0.75rem;
		z-index: 60;
		min-width: 12rem;
		padding: 0.4rem 0;
		background: var(--bg);
		border: 1px solid var(--rule);
		box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
	}

	/* hover, and :focus-within so tabbing through opens it with no script */
	.site-nav__list li.has-children:hover > .sub-menu,
	.site-nav__list li.has-children:focus-within > .sub-menu,
	.site-nav__list .sub-menu[data-open="true"] {
		display: block;
	}

	.site-nav__list .sub-menu a {
		display: block;
		padding: 0.45rem 0.9rem;
		font-size: 0.95rem;
		border-bottom: 0;
		white-space: nowrap;
	}

	.site-nav__list .sub-menu a:hover,
	.site-nav__list .sub-menu a:focus {
		background: var(--bg-soft);
		text-decoration: underline;
	}

	.site-nav__list .sub-menu a[aria-current="page"] {
		font-weight: 700;
		border-bottom: 0;
	}

}

/* --------------------------------------------------------------- footer */
.site-footer {
	border-top: 2px solid var(--rule-strong);
	margin-top: var(--step);
	padding-block: var(--gap) calc(var(--gap) * 1.5);
	font-family: var(--sans);
	font-size: var(--small);
	color: var(--ink-2);
}

.site-footer__grid {
	display: grid;
	gap: var(--gap);
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.site-footer h2 {
	font-size: 0.75rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin-bottom: 0.6em;
}

.site-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer li {
	margin-bottom: 0.35em;
}

.site-footer__note {
	margin-top: var(--gap);
	padding-top: var(--gap);
	border-top: 1px solid var(--rule);
	color: var(--ink-3);
}

/* ----------------------------------------------------------- typography */
.page-title {
	font-size: var(--h1);
	font-weight: 700;
	letter-spacing: -0.03em;
	margin-bottom: 0.3em;
}

.kicker {
	font-family: var(--sans);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ink-3);
	margin: 0 0 0.9em;
	display: flex;
	align-items: center;
	gap: 0.6em;
}

.kicker::before {
	content: "";
	width: 2rem;
	height: 3px;
	background: var(--ink);
	flex: none;
}

.deck {
	font-family: var(--serif);
	font-style: italic;
	font-size: clamp(1.125rem, 1.02rem + 0.5vw, 1.3125rem);
	line-height: 1.45;
	color: var(--ink-2);
	max-width: var(--measure);
	margin-bottom: 1.2em;
}

.entry-content h2 {
	font-size: var(--h2);
	margin-top: 1.8em;
	padding-top: 0.5em;
	border-top: 1px solid var(--rule);
}

.entry-content h3 {
	font-size: var(--h3);
	margin-top: 1.6em;
}

.entry-content h3.tprm-lab {
	font-size: 1.0625rem;
	letter-spacing: 0.01em;
	border-top: 2px solid var(--ink);
	padding-top: 0.6em;
	margin-top: 2em;
}

.entry-content > *,
.entry-header > * {
	max-width: var(--measure);
}

.entry-content > .tprm-code,
.entry-content > .tprm-table-scroll,
.entry-content > figure {
	max-width: min(100%, 52rem);
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.3em;
}

.entry-content li {
	margin-bottom: 0.4em;
}

.entry-content li::marker {
	color: var(--ink-3);
}

.entry-content :not(pre) > code,
.tprm-callout :not(pre) > code,
.tprm-table :not(pre) > code {
	font-family: var(--mono);
	font-size: 0.86em;
	background: var(--bg-code);
	border: 1px solid var(--rule);
	padding: 0.05em 0.3em;
	border-radius: 2px;
	white-space: nowrap;
}

.tprm-lead {
	font-family: var(--sans);
	font-size: var(--small);
	color: var(--ink-2);
	margin-bottom: 0.5em;
}

.tprm-center {
	text-align: center;
}

.tprm-learn,
.tprm-checks {
	list-style: none;
	padding-left: 0 !important;
}

.tprm-learn li,
.tprm-checks li {
	position: relative;
	padding-left: 1.7em;
	font-family: var(--sans);
	font-size: 1rem;
	margin-bottom: 0.5em;
}

.tprm-learn li::before,
.tprm-checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.3em;
	width: 0.85em;
	height: 0.85em;
	border: 2px solid var(--ink);
}

.tprm-empty {
	font-style: italic;
	color: var(--ink-2);
}

/* ----------------------------------------------------------------- code */
.tprm-code {
	margin: 0 0 1.4em;
	border: 1px solid var(--rule);
	border-left: 5px solid var(--ink);
	background: var(--bg-code);
}

.tprm-code--output {
	border-left-color: var(--ink-3);
}

.tprm-code__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.35rem 0.6rem;
	border-bottom: 1px solid var(--rule);
	background: var(--bg-soft);
}

.tprm-code__name {
	font-family: var(--sans);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-2);
}

.tprm-code__tools {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.tprm-code__status {
	font-family: var(--sans);
	font-size: 0.75rem;
	color: var(--ink-2);
}

.tprm-copy {
	font-family: var(--sans);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	background: var(--bg);
	color: var(--ink);
	border: 1px solid var(--ink-3);
	padding: 0.3rem 0.6rem;
	min-height: 28px;
	min-width: 44px;
	cursor: pointer;
}

.tprm-copy:hover {
	background: var(--ink);
	color: var(--bg);
	border-color: var(--ink);
}

.tprm-code__pre {
	margin: 0;
	padding: 0.85rem 0.75rem;
	overflow-x: auto;
	font-family: var(--mono);
	font-size: 0.875rem;
	line-height: 1.55;
	tab-size: 4;
}

.tprm-code__code {
	font-family: inherit;
	font-size: inherit;
	background: none;
	border: 0;
	padding: 0;
	white-space: pre;
}

.tprm-code__pre .c {
	color: var(--ink-3);
	font-style: italic;
}

.tprm-code__pre .k {
	font-weight: 700;
}

.tprm-code__pre .s {
	color: var(--ink-2);
	text-decoration: underline;
	text-decoration-color: var(--rule);
	text-underline-offset: 0.2em;
}

.tprm-code__pre .th {
	font-family: var(--sans);
	font-size: 0.75em;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.tprm-code__pre .pr {
	font-weight: 700;
}

/* ------------------------------------------------------------- callouts */
.tprm-callout {
	margin: 0 0 1.4em;
	padding: 0.8rem 1rem;
	border: 1px solid var(--ink);
	border-left-width: 6px;
	background: var(--bg);
	font-family: var(--sans);
	font-size: 1rem;
	line-height: 1.5;
	max-width: min(100%, 52rem);
}

.tprm-callout__label {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	margin: 0 0 0.4em;
	color: var(--ink);
}

.tprm-callout__body > *:last-child {
	margin-bottom: 0;
}

.tprm-callout--run,
.tprm-callout--explain,
.tprm-callout--test {
	background: var(--bg-soft);
}

.tprm-callout--note {
	border: 0;
	border-top: 2px solid var(--ink);
	border-bottom: 1px solid var(--rule);
	padding-left: 0;
	padding-right: 0;
	background: none;
}

.tprm-callout--reward {
	background: var(--bg-invert);
	color: var(--ink-invert);
	border: 0;
	padding: 1rem 1.1rem;
}

.tprm-callout--reward .tprm-callout__label {
	color: var(--ink-invert);
}

.tprm-callout--reward a {
	color: var(--ink-invert);
	text-decoration-color: var(--ink-invert);
}

.tprm-notice {
	border: 2px solid var(--ink);
	background: var(--bg-soft);
	padding: 0.75rem 1rem;
	margin: 0 0 1.4em;
	font-family: var(--sans);
	font-size: 1rem;
	max-width: min(100%, 52rem);
}

.tprm-notice p {
	margin: 0;
}

/* --------------------------------------------------- videos and pictures */
.tprm-embed {
	margin: 0 0 1.4em;
	max-width: min(100%, 52rem);
}

.tprm-embed__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--bg-soft);
	border: 1px solid var(--rule);
}

.tprm-embed__frame iframe,
.tprm-embed__frame object,
.tprm-embed__frame embed,
.tprm-embed__frame video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.tprm-embed__print {
	display: none;
	font-family: var(--sans);
	font-size: var(--small);
	color: var(--ink-2);
	margin: 0.5em 0 0;
	word-break: break-all;
}

.tprm-embed figcaption,
.tprm-figure figcaption,
.wp-caption-text {
	font-family: var(--sans);
	font-size: var(--small);
	color: var(--ink-2);
	margin-top: 0.5em;
	line-height: 1.45;
}

.tprm-figure,
.wp-caption,
.entry-content figure {
	margin: 0 0 1.4em;
	max-width: min(100%, 52rem);
}

.tprm-figure img,
.wp-caption img,
.entry-content figure img,
.entry-content img {
	max-width: 100%;
	height: auto;
	border: 1px solid var(--rule);
	background: var(--bg-soft);
}

.entry-content img.alignleft,
.entry-content img.alignright,
.entry-content img.aligncenter {
	display: block;
	margin: 0 0 1rem;
}

.entry-content .alignright {
	margin-left: auto;
}

.entry-content .aligncenter {
	margin-inline: auto;
}

/* ------------------------------------------------------- attached files */
.tprm-files {
	margin-top: var(--step);
	border-top: 2px solid var(--ink);
	padding-top: 1rem;
	max-width: min(100%, 52rem);
}

.tprm-files__heading {
	font-size: var(--h3);
	margin: 0 0 0.6em;
	border-top: 0;
	padding-top: 0;
}

.tprm-files__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tprm-files__item {
	border-bottom: 1px solid var(--rule);
	padding: 0.7rem 0;
}

.tprm-files__link {
	font-family: var(--sans);
	font-weight: 600;
}

.tprm-files__meta,
.tprm-file__meta {
	font-family: var(--sans);
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	color: var(--ink-3);
	white-space: nowrap;
}

.tprm-files__desc {
	display: block;
	font-size: 1rem;
	color: var(--ink-2);
	margin-top: 0.2em;
}

.tprm-file {
	font-family: var(--sans);
	font-weight: 600;
}

/* ------------------------------------------------------------- read-only */
.tprmway-readonly-banner {
	margin: 0;
	background: var(--bg-invert);
	color: var(--ink-invert);
	font-family: var(--sans);
	font-size: var(--small);
	font-weight: 600;
	padding: 0.6rem 1rem;
	text-align: center;
}

/* --------------------------------------------------------------- tables */
.tprm-table-scroll {
	overflow-x: auto;
	margin: 0 0 1.4em;
	border-bottom: 1px solid var(--rule);
}

.tprm-table {
	border-collapse: collapse;
	width: 100%;
	font-family: var(--sans);
	font-size: 0.9375rem;
	margin: 0;
}

.tprm-table caption {
	font-family: var(--sans);
	font-size: var(--small);
	color: var(--ink-2);
	text-align: left;
	padding-bottom: 0.5em;
}

.tprm-table th,
.tprm-table td {
	text-align: left;
	vertical-align: top;
	padding: 0.55em 0.9em 0.55em 0;
	border-bottom: 1px solid var(--rule);
}

.tprm-table thead th {
	font-size: 0.6875rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-2);
	border-bottom: 2px solid var(--ink);
	white-space: nowrap;
}

.tprm-table tbody th {
	font-weight: 600;
	white-space: nowrap; /* labels such as "2. PREDICT" stay on one line; the column shrinks to fit */
	width: 1%;
}

.tprm-table code {
	white-space: pre;
}

/* ---------------------------------------------------------------- cards */
.tprm-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
	border-top: 2px solid var(--ink);
	padding-top: 1.1rem;
}

.tprm-card__cover img {
	width: 9rem;
	height: auto;
	border: 1px solid var(--rule);
	box-shadow: 0 2px 10px var(--shadow);
}

.tprm-card__title {
	font-size: 1.25rem;
	margin-bottom: 0.25em;
}

.tprm-card__title a {
	text-decoration: none;
}

.tprm-card__title a:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.tprm-card__subtitle {
	font-family: var(--sans);
	font-size: var(--small);
	color: var(--ink-3);
	margin-bottom: 0.6em;
}

.tprm-card__desc {
	font-size: 1rem;
	margin-bottom: 0.8em;
}

.tprm-card__buy {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.6em;
}

.tprm-card__more {
	font-family: var(--sans);
	font-size: var(--small);
	margin: 0;
}

.tprm-button,
.button {
	display: inline-block;
	font-family: var(--sans);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-decoration: none;
	background: var(--ink);
	color: var(--bg);
	border: 2px solid var(--ink);
	padding: 0.55rem 1rem;
	min-height: 44px;
	line-height: 1.6;
}

.tprm-button:hover {
	background: var(--bg);
	color: var(--ink);
	text-decoration: none;
}

.tprm-button--ghost {
	background: var(--bg);
	color: var(--ink);
}

.tprm-button--ghost:hover {
	background: var(--ink);
	color: var(--bg);
}

/* ------------------------------------------------------------ home page */
.hero {
	border-bottom: 2px solid var(--ink);
	padding-bottom: var(--gap);
	margin-bottom: var(--step);
}

.hero__title {
	font-size: var(--h1);
	letter-spacing: -0.035em;
	margin-bottom: 0.35em;
}

.hero__lede {
	max-width: var(--measure);
	font-size: clamp(1.125rem, 1.05rem + 0.5vw, 1.3125rem);
	margin-bottom: 1em;
}

.section {
	margin-bottom: var(--step);
}

.section__title {
	font-size: var(--h2);
	border-bottom: 2px solid var(--ink);
	padding-bottom: 0.3em;
	margin-bottom: 1em;
}

.steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1.2rem;
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.steps__item {
	border-top: 1px solid var(--rule);
	padding-top: 0.8rem;
}

.steps__letter {
	font-family: var(--sans);
	font-weight: 700;
	font-size: 2.25rem;
	line-height: 1;
	letter-spacing: -0.04em;
	display: block;
	margin-bottom: 0.15em;
}

.steps__name {
	font-family: var(--sans);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--ink-3);
	display: block;
	margin-bottom: 0.5em;
}

.steps__text {
	font-size: 1rem;
	margin: 0;
}

.books {
	display: grid;
	gap: var(--gap);
	grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.free-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.9rem;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.free-list li {
	border-top: 1px solid var(--rule);
	padding-top: 0.6rem;
	font-size: 1rem;
}

.free-list strong {
	font-family: var(--sans);
	display: block;
	font-size: 0.95rem;
}

@media (min-width: 40rem) {
	.tprm-card {
		grid-template-columns: 9.5rem minmax(0, 1fr);
		gap: 1.25rem;
	}
}

/* --------------------------------------------------- book & chapter nav */
.book-header {
	display: grid;
	gap: var(--gap);
	margin-bottom: var(--step);
	border-bottom: 2px solid var(--ink);
	padding-bottom: var(--gap);
}

.book-header__cover img {
	width: 12rem;
	border: 1px solid var(--rule);
	box-shadow: 0 2px 14px var(--shadow);
}

.book-header__facts {
	font-family: var(--sans);
	font-size: var(--small);
	color: var(--ink-2);
	list-style: none;
	margin: 1em 0 0;
	padding: 0;
}

.book-header__facts li {
	border-top: 1px solid var(--rule);
	padding: 0.4em 0;
}

@media (min-width: 48rem) {
	.book-header {
		grid-template-columns: 13rem minmax(0, 1fr);
	}
}

.chapter-art {
	margin: 0 0 var(--gap);
	max-width: min(100%, 52rem);
}

.chapter-art img {
	width: 100%;
	border: 1px solid var(--rule);
}

.tprm-chapters {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: none;
}

.tprm-chapters__item {
	border-top: 1px solid var(--rule);
	padding: 0.7rem 0;
}

.tprm-chapters__item:last-child {
	border-bottom: 1px solid var(--rule);
}

.tprm-chapters__link {
	text-decoration: none;
	display: block;
	font-family: var(--sans);
	min-height: 44px;
	padding: 0.2rem 0;
}

.tprm-chapters__link:hover .tprm-chapters__title {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.tprm-chapters__number {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ink-3);
	display: block;
}

.tprm-chapters__title {
	font-weight: 600;
	font-size: 1.0625rem;
}

.tprm-chapters__deck {
	display: block;
	font-family: var(--serif);
	font-size: 1rem;
	color: var(--ink-2);
	margin-top: 0.2em;
}

.tprm-downloads {
	list-style: none;
	margin: 0 0 1.4em;
	padding: 0;
}

.tprm-download {
	border-top: 1px solid var(--rule);
	padding: 0.8rem 0;
}

.tprm-download:last-child {
	border-bottom: 1px solid var(--rule);
}

.tprm-download__title {
	font-family: var(--sans);
	font-weight: 600;
	font-size: 1.0625rem;
	margin: 0 0 0.2em;
}

.tprm-download__desc {
	margin: 0 0 0.3em;
	font-size: 1rem;
}

.tprm-download__meta {
	font-family: var(--sans);
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	color: var(--ink-3);
	margin: 0;
}

.chapter-nav {
	margin-top: var(--step);
	border-top: 2px solid var(--ink);
	padding-top: 1rem;
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	font-family: var(--sans);
}

.chapter-nav__link {
	display: block;
	text-decoration: none;
	padding: 0.5rem 0;
	min-height: 44px;
}

.chapter-nav__link:hover .chapter-nav__title {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.chapter-nav__dir {
	display: block;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ink-3);
}

.chapter-nav__title {
	font-weight: 600;
}

.chapter-nav__next {
	text-align: right;
}

.breadcrumb {
	font-family: var(--sans);
	font-size: var(--small);
	margin-bottom: 1rem;
}

.breadcrumb ol {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
}

.breadcrumb li + li::before {
	content: "/";
	color: var(--ink-3);
	margin-right: 0.4rem;
}

.post-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.post-list__item {
	border-top: 1px solid var(--rule);
	padding: 1.1rem 0;
	max-width: var(--measure);
}

.post-list__title {
	font-size: var(--h3);
	margin-bottom: 0.2em;
}

.post-list__title a {
	text-decoration: none;
}

.post-list__title a:hover {
	text-decoration: underline;
}

.post-list__meta {
	font-family: var(--sans);
	font-size: var(--small);
	color: var(--ink-3);
	margin-bottom: 0.4em;
}

.pagination {
	margin-top: var(--step);
	font-family: var(--sans);
	font-size: var(--small);
}

.pagination .page-numbers {
	display: inline-block;
	padding: 0.5rem 0.75rem;
	min-width: 44px;
	min-height: 44px;
	text-align: center;
	border: 1px solid var(--rule);
	text-decoration: none;
	margin-right: 0.3rem;
}

.pagination .current {
	background: var(--ink);
	color: var(--bg);
	border-color: var(--ink);
}

/* ---------------------------------------------------------------- forms */
.search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: flex-end;
	max-width: 30rem;
	margin: var(--step) 0 var(--gap);
}

.search-form__field {
	flex: 1 1 14rem;
}

.search-form label {
	display: block;
	font-family: var(--sans);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-2);
	margin-bottom: 0.3em;
}

.search-form input[type="search"] {
	width: 100%;
	font-family: var(--sans);
	font-size: 1rem;
	padding: 0.55rem 0.65rem;
	min-height: 44px;
	background: var(--bg);
	color: var(--ink);
	border: 2px solid var(--ink-3);
}

.search-form input[type="search"]:focus-visible {
	border-color: var(--ink);
}

.search-form button {
	font-family: var(--sans);
	font-size: 0.9375rem;
	font-weight: 600;
	background: var(--ink);
	color: var(--bg);
	border: 2px solid var(--ink);
	padding: 0.55rem 1rem;
	min-height: 44px;
	cursor: pointer;
}

.search-form button:hover {
	background: var(--bg);
	color: var(--ink);
}

/* -------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* --------------------------------------------------------------- print */
@media print {
	:root {
		--bg: #ffffff;
		--bg-soft: #ffffff;
		--bg-code: #ffffff;
		--ink: #000000;
		--ink-2: #222222;
		--ink-3: #444444;
		--rule: #999999;
	}

	body {
		font-size: 11pt;
		background: #fff;
		color: #000;
	}

	.site-header,
	.site-footer,
	.skip-link,
	.theme-switch,
	.nav-toggle,
	.site-nav,
	.chapter-nav,
	.tprm-copy,
	.tprm-code__status,
	.search-form,
	.breadcrumb {
		display: none !important;
	}

	.shell {
		width: auto;
	}

	.entry-content > *,
	.entry-content > .tprm-code,
	.entry-content > .tprm-table-scroll,
	.entry-content > figure,
	.tprm-callout,
	.tprm-notice,
	.prose {
		max-width: none;
	}

	.tprm-code {
		border: 1px solid #999;
		border-left: 3px solid #000;
		break-inside: avoid;
	}

	.tprm-code__pre {
		white-space: pre-wrap;
		font-size: 9pt;
	}

	.tprm-callout,
	.tprm-figure,
	.tprm-files__item {
		break-inside: avoid;
	}

	/* A video cannot be printed. Print where it lives instead. */
	.tprm-embed__frame {
		display: none;
	}

	.tprm-embed__print {
		display: block;
	}

	.tprm-files {
		border-top: 1px solid #000;
	}

	.tprm-files__link::after {
		content: " (" attr(href) ")";
		font-size: 9pt;
		color: #444;
		word-break: break-all;
	}

	.tprmway-readonly-banner {
		display: none;
	}

	.tprm-callout--reward {
		background: #fff;
		color: #000;
		border: 2px solid #000;
	}

	.tprm-callout--reward .tprm-callout__label {
		color: #000;
	}

	a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: 9pt;
		color: #444;
		word-break: break-all;
	}

	h1,
	h2,
	h3 {
		break-after: avoid;
	}

	img {
		break-inside: avoid;
	}
}
