﻿*, *::before, *::after {
    box-sizing: border-box;
}

body {
	background: #FFFFFF;
    font-size: 1.25rem;
    margin: 0;
    padding: clamp(0.8rem, 2vw, 2rem);
    font-family: system-ui, sans-serif;
    line-height: 1.0;
    color: #222;
    background-color: #f7f7f7;
}

img {
    vertical-align: middle !important;
}

nav {
	float: left;
	width: 100%;
	background: #FF9900;
/*	font-size: 20px; */
	font-size: 20px;
}
nav ul {
	font-size: 1.25rem;
	margin: 0;
	padding: 0;
	color: #000000;
}

nav a {
  display: block;
  color: #fff;
  text-decoration: none;
}

nav ul li {
  position: relative;
  float: left;
  list-style: none;
  color: #fff;
  transition: 0.5s;
}

/* Innenabstabd eines Elementes - günstig: 20px*/
nav ul li a {
  padding: 15px;
}


nav ul > li.submenu > a:after {
  position: relative;
  float: right;
  content: '';
  margin-left: 10px;
  margin-top: 5px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #fff;
  border-bottom: 5px solid transparent;
}

nav ul ul li.submenu > a:after {
  margin-left: auto;
  margin-right: -10px;
  border-left: 5px solid #fff;
  border-right: 5px solid transparent;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

nav ul li:hover {
  background: #4096ee;
}

nav ul ul {
	position: absolute;
	top: -9999px;
	left: -9999px;
	background: #CC6600;
	box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
	z-index: 1;
	color: #800000;
}

nav ul ul li {
  float: none;
  width: 300px;
  border-bottom: 1px solid #555;
}

/* padding Innenabstand des Elements - erster Wert nach oben - günstig 30px */

nav ul ul li a {
  padding: 20px 20px;
}


nav ul ul li:last-child {
  border-bottom: none;
}

nav ul li:hover > ul {
  top: 100%;
  left: 0;
}

nav ul ul li:hover > ul {
  top: 0;
  left: 200px;
}
.kapitel-abstract {
  background-color: #f0f4f8;
  border-left: 4px solid #0077aa;
  padding: 1em;
  margin-bottom: 2em;
  font-style: italic;
}
/* Einheitliche Überschriften-Typografie */
h1, h2, h3, h4 {
    color: #4096ee; /* Hellblau wie früher */
    font-weight: 600;
    line-height: 1.3;
    margin-top: 1.2rem;
    margin-bottom: 0.6rem;
}

/* Kompaktere Überschriften-Abstände */
h1, h2, h3, h4 {
    line-height: 1.2;      /* enger, wissenschaftlicher */
    margin-top: 0.9rem;    /* weniger Abstand nach oben */
    margin-bottom: 0.4rem; /* weniger Abstand nach unten */
}

/* Harmonische Größen */
h1 { font-size: 2.0rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }   /* deine neue Größe */
h4 { font-size: 1.4rem; }   /* deine neue Größe */

.page-wrapper {
    max-width: 60rem;   /* ca. 960px – ideal für wissenschaftliche Texte */
    margin: 0 auto;     /* zentriert */
    padding: 1rem;      /* Innenabstand */
}
/* Navigation zwischen Kapiteln */
.chapter-nav {
    display: flex;
    justify-content: space-between; /* Links und rechts */
    margin-top: 2rem;
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

.chapter-nav a {
    color: #4096ee;
    text-decoration: none;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
}

.chapter-nav a:hover {
    background-color: #e8f2ff;
}
#backToTop {
    position: fixed;          /* wichtig: macht ihn schwebend */
    bottom: 20px;
    right: 20px;
    padding: 0.6rem 0.9rem;
    font-size: 1rem;
    background-color: #4096ee;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: none;            /* wird per JS ein-/ausgeblendet */
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#backToTop:hover {
    background-color: #2f7ed1;
}
.page-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.title-main {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 0.8rem;
}

.author {
  font-size: 1rem;
  color: #333;
}

.toc ol { list-style: none; padding-left: 0; }
.toc li { margin: 0.3rem 0; }
.toc a { text-decoration: none; }
.toc a { color: #000 !important; }
nav.toc { background: #ffffff !important; }

