
/* About this style sheet */

/* Author/source: Martin Post / 9to5 Media Services – https://9to5.services/ */

/* How and where to use: This is a stand-alone e-book style sheet for showcasing how HTML + CSS can be used to present classic literature. */

/* SOME SECTIONS LIFTED FROM 9to5.css – if this gets much bigger, a separate CSS generator sheet may be required. */

/* Used at: https://classic-books.specs-and-docs.online/ */

/* Last edit date: 2025-01-30-12-07-52 */

/* Last edits: */
/* Added centered intro classes */

/* Variables Begin */
	*	{
		}
/* Print / page variables */
	title	{
		string-set:	VarDocTitle content();
		}
	h1	{
		string-set:	VarChapterTitle content();
		}
/* Variables End */



/* Rules for all media BEGIN */
	blockquote	{
		font-style:	italic;
		}
	h1,
	figcaption,
	figure,
	.document-author-name, 
	.document-date, 
	.document-publication-name, 
	.document-url, 
	.document-url-original, 
	.title,
	#title
		{
		text-align:	center;
		}
	img	{
		display:	block;
		max-width:	100%;
		}
	img.smaller	{
		max-width:	60%;
		}
/* Rules for all media END */



/* Rules for screen basics BEGIN */
@media screen		{
	*	{
		box-sizing:	border-box;
		}
	body	{
		font-family:	Noto Serif,Times New Roman,serif;
		font-size:	14pt;
		line-height:	1.6;
		}
	a	{
		border-bottom:	2px solid #999999;
		color:	#111111;
		text-decoration:	none;
		}
	a:hover	{
		background-color:	#999999;
		border-bottom:	2px solid #ffffff;
		color:	#ffffff;
		}
	footer	{
		border-top:	1px solid #999999;
		margin-top:	3rem;
		}
	h1,
	.title,
	#title	{
		font-size:	3rem;
		line-height:	4.2rem;
		}
	main > *	{
		margin-left:	auto;
		margin-right:	auto;
		}
	.chunkednav	{
		float:	right;
		margin-bottom:	20px;
		padding:	0.7rem;
		}
	.chunkednav *	{
		font-size:	0.9rem;
		line-height:	1.3rem;
		}
	.chunkednav a	{
		text-decoration:	none;
		border-bottom:	0px solid transparent;
		}
	.navlink	{
		display:	block;
		}
	.navlink-label	{
		margin-right:	1em;
		}
/* Poster background rules taken from 9to5.css */
	.poster-background {
		background-position: center center;
		background-repeat: no-repeat;
		background-size: cover;
		padding-bottom: 6rem;
		padding-left: 2rem;
		padding-right: 2rem;
		padding-top: 6rem;
		text-align: center;
		width: 100%;
		}
		}
/* Rules for screen basics END */



/* Media Screen Queries BEGIN */
@media screen and (max-width:767px)		{
	main > *	{
		max-width:	90%;
		}
		}
@media screen and (min-width:1024px)		{
	main > *	{
		max-width:	52rem;	/* Fine-tune to avoid clashes with 9to5_toc.css */
		}
		}
/* Media Screen Queries END */



/* Media Print BEGIN */

@media print		{
	#TOC a 	{
		border-bottom-width:	0;
		text-decoration:	none;
		}
	.chunkednav
		{
		display:	none;	/* Hide navigation section in print */
		}
	.poster-background 	{		/* Enlarged poster background title */
		background-position:	center center;
		background-repeat:	no-repeat;
		background-size:	cover;
		color:	white;
		padding-bottom:	5cm;
		padding-left:	1cm;
		padding-right:	1cm;
		padding-top:	5cm;
		text-align:	center;
		text-align:	center;
		width:	var(--width-full);
		}
@page		{
		margin:	1.5cm 2.8cm 2cm 2.8cm;
		}
	body	{
		font-family:	Noto Serif,Times New Roman,serif;
		font-size:	12pt;
		line-height:	18pt;
		}
	h1,
	.title,
	#title	{
		font-size:	28pt;
		line-height:	40pt;
		}
	h1,
	.title,
	#title,
	#TOC	{
		page-break-before:	always;
		}
	img	{
		margin-left:	auto;
		margin-right:	auto;
		}
	p	{
		text-align:	justify;
		}
	a	{
		color:	#000000;
		}



/* CREATED PRINT CONTENT – chapter names, page numbers, exceptions */
#TOC a::after 	{
	content:	leader('. ') target-counter(attr(href), page);
	}



/* LEFT pages – page counter left, VarDocTitle from H1 right */
@page:left		{
@top-left		{
		color:	#555;
		content:	normal;	/* Optional watermark or other text here, for example: Do not distribute. */
		font-family:	"Helvetica Neue LT",
			"Helvetica Neue",
			"Helvetica",
			"sans-serif";
		font-size:	7pt;
		font-style:	italic;
		margin-right:	0;
		}
@bottom-left		{
		content:	counter(page);	/* Put the page number here */
		font-family:	"Helvetica Neue LT",
			"Helvetica Neue",
			"Helvetica",
			"sans-serif";
		font-size:	7pt;
		margin-left:	0cm;
		}
@bottom-right		{
		color:	#555;
		content:	string(VarDocTitle);	/* Document title from h1 here  */
		font-family:	"Helvetica Neue LT",
			"Helvetica Neue",
			"Helvetica",
			"sans-serif";
		font-size:	7pt;
		margin-right:	0;
		}
		}



/* RIGHT pages – page counter right, VarChapterTitle from H2 left, optional watermark text right top */
@page:right		{
@top-right		{
		color:	#555;
		content:	normal;	/* Optional watermark or other text here, for example: Do not distribute. */
		font-family:	"Helvetica Neue LT",
			"Helvetica Neue",
			"Helvetica",
			"sans-serif";
		font-size:	7pt;
		font-style:	italic;
		margin-right:	0;
		}
@bottom-left		{
		color:	#555;
		content:	string(VarChapterTitle);	/* Chapter title from the last h2  */
		font-family:	"Helvetica Neue LT",
			"Helvetica Neue",
			"Helvetica",
			"sans-serif";
		font-size:	7pt;
		margin-left:	0;
		}
@bottom-right		{
		content:	counter(page);	/* Page number  */
		font-family:	"Helvetica Neue LT",
			"Helvetica Neue",
			"Helvetica",
			"sans-serif";
		font-size:	7pt;
		margin-right:	0cm;
		}
		}



/* FIRST (RIGHT) PAGE – no created content in bottom right */
@page:first		{
@bottom-right		{
		content:	normal;
		}
		}
		}
/* Media Print END */
