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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	padding: 8px 8px 24px;
	background: url("/images/bg.jpg");
	color: #0e0e11;
	font-family: "Trebuchet MS", Helvetica, sans-serif;
	font-size: 16px;
	line-height: 1.4;
}

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

a {
	color: #09090a;
	text-decoration: none;
}

a:hover {
	color: #272729;
}

a:active {
	color: #c6c6ce;
}

h1,
h2,
h3 {
	margin: 0;
	font-family: Futura, Helvetica, sans-serif;
	font-weight: bold;
	text-transform: uppercase;
}

.site-title {
	font-size: clamp(40px, 10vw, 80px);
	text-shadow: #444 4px 4px 4px;
}

.page-title {
	font-size: clamp(32px, 7vw, 60px);
	text-align: center;
	text-shadow: #444 2px 2px 2px;
}

.section-title {
	font-size: 30px;
	text-align: center;
	text-shadow: #444 2px 2px 2px;
}

.frame {
	max-width: 977px;
	margin: 0 auto;
	padding: 6px 0 8px;
	background:
		url("/images/content_top_header.png") top / 100% 6px no-repeat,
		url("/images/content_bottom.png") bottom / 100% 8px no-repeat;
}

.nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 6px;
	min-height: 52px;
	padding: 8px 24px;
	background: url("/images/content_top_tabs.png") 0 0 / 100% 100% no-repeat;
}

.btn,
.toc-button {
	display: inline-block;
	padding: 5px 8px;
	border: 0;
	border-radius: 5px;
	background: url("/images/b1.png") repeat-x;
	background-size: auto 100%;
	box-shadow: 2px 2px 5px #414141;
	color: #09090a;
	font: inherit;
	font-size: 18px;
	cursor: pointer;
}

.btn:hover {
	background-image: url("/images/b2.png");
}

.btn[aria-current="page"] {
	background-image: url("/images/b2.png");
}

.toc-button {
	grid-area: toc;
	justify-self: center;
	margin-bottom: 20px;
	background-image: url("/images/b1_2.png");
	font-weight: bold;
}

.toc-button:hover {
	background-image: url("/images/b2_2.png");
}

.body {
	display: grid;
	grid-template-columns: minmax(0, 750fr) minmax(0, 227fr);
}

.main {
	padding: 20px 10px;
	background: url("/images/content_right.png") 0 0 / 100% 1px repeat-y;
}

.sidebar {
	background: url("/images/content_left.png") 0 0 / 100% 1px repeat-y;
}

.footer {
	margin-top: 32px;
	font-size: 11px;
	text-align: center;
	text-shadow: #fff -2px -2px 5px;
}

.footer img {
	width: 10px;
	height: 10px;
	box-shadow: 0 0 5px #fff;
	vertical-align: middle;
}

.footer a:hover img {
	box-shadow: 0 0 5px #4693c2;
}

.book {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

.cover {
	position: relative;
	flex: 1 1 340px;
	align-self: flex-start;
	max-width: 440px;
}

.cover img {
	display: block;
	width: 100%;
	aspect-ratio: 440 / 660;
	object-fit: cover;
}

.cover .cover-back {
	position: absolute;
	inset: 0;
	opacity: 0;
}

.cover:hover .cover-back {
	opacity: 1;
}

.book-info {
	display: flex;
	flex: 0 1 290px;
	flex-direction: column;
}

.details,
.description {
	padding: 12px;
	border: 2px solid #181816;
	border-radius: 7px;
	background-color: #fff;
}

.details {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas:
		"toc toc"
		"price buy"
		"bulk buy";
	align-items: center;
	gap: 0 8px;
	border-bottom: 0;
	border-radius: 7px 7px 0 0;
	text-align: center;
}

.description {
	border-top: 0;
	border-radius: 0 0 7px 7px;
}

.buy {
	display: flex;
	grid-area: buy;
	flex-direction: column;
	gap: 6px;
}

.buy form {
	margin: 0;
}

.buy input[type="image"] {
	width: 163px;
	max-width: 100%;
	height: auto;
}

.price {
	grid-area: price;
	align-self: end;
	margin: 0;
}

.bulk {
	grid-area: bulk;
	align-self: start;
	margin: 12px 0 0;
	font-size: 11px;
	font-style: italic;
}

.description h3 {
	margin-bottom: 12px;
	font-size: 10px;
	text-align: center;
	text-shadow: #444 4px 4px 4px;
}

.description-text {
	max-height: 410px;
	overflow-y: auto;
}

.description-text p {
	margin: 0 0 1em;
}

.toc {
	width: min(540px, calc(100% - 32px));
	max-height: calc(100% - 32px);
	padding: 0;
	border: 2px solid #181816;
	border-radius: 7px;
}

.toc::backdrop {
	background: rgb(0 0 0 / 0.75);
}

.toc-header {
	display: flex;
	position: sticky;
	top: 0;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	background: #fff;
	border-bottom: 1px solid #ccc;
}

.toc-header h2 {
	font-size: 18px;
}

.toc-close {
	border: 0;
	background: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

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

.toc li {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 4px 12px;
	padding: 8px 14px;
	border-top: 1px solid #f0f0f0;
	background: linear-gradient(#e6e6e6, #ccc);
}

.toc li:hover {
	background: linear-gradient(#454545, #000);
	color: #fff;
}

.toc li:hover a {
	color: #fff;
}

.toc .chapter {
	font-family: Arial, Helvetica, sans-serif;
	text-transform: uppercase;
}

.toc .samples a {
	text-decoration: underline;
}

.testimonial {
	position: relative;
	margin: 24px 0;
	padding: 12px 36px;
	border-radius: 5px;
	box-shadow: 2px 2px 5px #404040;
}

.testimonial p {
	margin: 0 0 1em;
}

.testimonial p:last-of-type {
	margin-bottom: 0;
}

.testimonial::before,
.testimonial::after {
	position: absolute;
	width: 16px;
	height: 16px;
	background-size: contain;
	content: "";
}

.testimonial::before {
	top: 12px;
	left: 12px;
	background-image: url("/images/quote2.png");
}

.testimonial::after {
	right: 12px;
	bottom: 12px;
	background-image: url("/images/quote1.png");
}

.testimonial cite {
	display: block;
	margin-top: 0.5em;
	font-style: normal;
}

.contact {
	text-align: center;
}

.contact-icon {
	display: inline-block;
	margin-top: 8px;
}

.facebook-icon {
	width: 14px;
	height: 14px;
	box-shadow: 0 0 5px #fff;
	vertical-align: middle;
}

a:hover .facebook-icon {
	box-shadow: 0 0 5px #4693c2;
}

.message {
	padding: 40px 0;
}

@media (max-width: 760px) {
	.body {
		grid-template-columns: 1fr;
	}

	.main {
		background: #fff;
	}

	.sidebar {
		display: none;
	}

	.nav {
		padding: 8px 12px;
		background: #d6d6d6;
	}
}
