
/* About this style sheet */

/* Style sheet type: STANDALONE */

/* 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://9to5.de/showcase/classic_books/ */

/* Last edit date: 2026-06-15 */
/* Last edits: made book_classic and book_modern identical, applied --font-family-base for override through metadata files. */

/* BOOK STYLE SHEET BEGIN */

/* ALL MEDIA – ROOT VARIABLE DEFINITIONS */
/* */
:root	{
	--font-family-base:	"IBM Plex Sans", "Noto Sans", "Helvetica Neue", Helvetica, sans-serif;
	}
h1	{
	string-set:	VarChapterTitle content();
	}
title	{
	string-set:	VarDocTitle content();
	}
/* */
/* VARIABLES END */



/* RULES FOR ALL MEDIA BEGIN */

	blockquote,
	.repeating_title	{
		font-style:	italic;
		}
	h1,
	figcaption,
	figure,
	.center,
	.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:	var(--font-family-base);
		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;
		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:	var(--font-family-base);
		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:	var(--font-family-base);
		font-size:	7pt;
		font-style:	italic;
		margin-right:	0;
		}
@bottom-left		{
		content:	counter(page);	/* Put the page number here */
		font-family:	var(--font-family-base);
		font-size:	7pt;
		margin-left:	0cm;
		}
@bottom-right		{
		color:	#555;
		content:	string(VarDocTitle);	/* Document title from h1 here  */
		font-family:	var(--font-family-base);
		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:	var(--font-family-base);
		font-size:	7pt;
		font-style:	italic;
		margin-right:	0;
		}
@bottom-left		{
		color:	#555;
		content:	string(VarChapterTitle);	/* Chapter title from the last h2  */
		font-family:	var(--font-family-base);
		font-size:	7pt;
		margin-left:	0;
		}
@bottom-right		{
		content:	counter(page);	/* Page number  */
		font-family:	var(--font-family-base);
		font-size:	7pt;
		margin-right:	0cm;
		}
		}

/* FIRST (RIGHT) PAGE – NO CREATED CONTENT IN BOTTOM RIGHT */

@page:first		{
@bottom-right		{
		content:	normal;
		}
		}
		}
/* MEDIA PRINT END */

/* BOOK STYLE SHEET END */
