/* Bildschirm-Fassung des Handbuchs (dist/web): styles.css ist fuer A4/Druck
   gebaut, hier werden nur die Masse fuer schmale Screens gezaehmt. */
body {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

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

.cover {
  min-height: 0;
  padding: 32px 24px;
  border-radius: 12px;
  page-break-after: auto;
}

.cover .subtitle {
  max-width: none;
}

.cover .meta {
  position: static;
  margin-top: 24px;
}

figure.shot img {
  max-height: none;
  max-width: min(100%, 360px);
}

.pdf-link {
  margin: 12px 0;
  text-align: right;
  font-size: 0.9rem;
}

/* Inhaltsverzeichnis: Kapitel als Kacheln, zwei Spalten ab ~700px. Die
   Struktur kommt aus styles.css, hier nur Bildschirm-Masse und Hover. */
html {
  scroll-behavior: smooth;
}

h1,
h2,
h3 {
  scroll-margin-top: 16px;
}

nav#TOC {
  padding: 8px 0;
}

nav#TOC .toc-title {
  font-size: 1.7rem;
  margin: 28px 0 0;
}

nav#TOC .toc-part {
  margin-top: 28px;
}

nav#TOC .toc-part-head {
  gap: 12px;
  padding-bottom: 8px;
  margin-bottom: 14px;
}

nav#TOC .toc-part-title {
  font-size: 0.8rem;
}

nav#TOC .toc-part-sub {
  font-size: 0.9rem;
}

nav#TOC .toc-chapters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 12px;
}

nav#TOC .toc-chapter {
  margin: 0;
  padding: 14px 16px;
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

nav#TOC .toc-chapter:only-child {
  grid-column: 1 / -1;
}

nav#TOC .toc-chapter:hover,
nav#TOC .toc-chapter:focus-within {
  border-color: var(--ice-blue);
  background: #fff;
}

nav#TOC .toc-chapter-link {
  gap: 12px;
  font-size: 1.05rem;
}

nav#TOC .toc-chapter-link:hover .toc-chapter-title {
  color: var(--ice-blue);
}

nav#TOC .toc-num {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 0.95rem;
}

nav#TOC .toc-sections {
  margin: 8px 0 0 44px;
  font-size: 0.9rem;
  line-height: 1.6;
}

nav#TOC .toc-sections li:not(:last-child)::after {
  margin: 0 3px;
}

nav#TOC .toc-sections a:hover {
  color: var(--ice-blue);
  text-decoration: underline;
}

@media (max-width: 480px) {
  nav#TOC .toc-sections {
    margin-left: 0;
  }
}

@media print {
  .pdf-link {
    display: none;
  }
}
