* { box-sizing: border-box;}
pre{
background-color: #AFD;
height: 200px;
overflow: scroll;
}
body {
	font-family: Arial, sans-serif;
	margin: 0;
}
html {
  scroll-behavior: smooth;
}
.tree {
  --spacing: 1.2rem;
  --radius: 8px;
  margin:0px;
  padding:0px;
}
.tree li {
  display: block;
  position: relative;
  padding-left: calc(2 * var(--spacing) - var(--radius) - 2px);
}
.tree ul {
  margin-left: calc(var(--radius) - var(--spacing));
  padding-left: 0;
}
.tree ul li {
  border-left: 2px solid #ddd;
}
.tree ul li:last-child {
  border-color: transparent;
}
.tree ul li::before {
  content: '';
  display: block;
  position: absolute;
  top: calc(var(--spacing) / -2 - 2px);
  left: -2px;
  width: calc(var(--spacing) + 2px);
  height: calc(var(--spacing) + 1px);
  border: solid #ddd;
  border-width: 0 0 2px 2px;
  border-bottom-left-radius: 0.5rem;
}
.tree summary {
  display: block;
  cursor: pointer;
}
.tree summary::marker,
.tree summary::-webkit-details-marker {
  display: none;
}
.tree summary:focus {
  outline: none;
}
.tree summary:focus-visible {
  outline: 1px dotted #000;
}
.tree li::after,
.tree summary::before {
  content: '';
  display: block;
  position: absolute;
  top: calc(var(--spacing) / 2 - var(--radius));
  left: calc(var(--spacing) - var(--radius) - 1px);
  width: calc(2 * var(--radius));
  height: calc(2 * var(--radius));
  border-radius: 50%;
  background: #ddd;
}
.tree summary::before {
  z-index: 1;
  background: #696 url('expand-collapse.svg') 0 0;
  background-size: calc(4 * var(--radius)) calc(2*var(--radius));
}
.tree details[open] > summary::before {
  background-position: calc(-2 * var(--radius)) 0;
}
.tree a {
	text-decoration: none; 
	color: blue;
  transition: color .2s ease-out;
}
.tree a.selected {
	font-weight: bold; 
  color: gold;
}
.tree a:hover{
  color: magenta;
}
.content{
	padding: 1rem;
}
/*
h1 {
	border-top: 3px solid black;
	border-bottom: 3px solid black;
	padding: 1rem;
	background-color: gold;
}*/
h1 {
    border-top: 3px solid black;
    border-bottom: 3px solid black;
    padding: 1rem;
    background-color: gold;
    color: black;
    font-family: 'Arial', sans-serif;
    font-size: 2.5rem;
    letter-spacing: 0.1rem;
    text-align: center;
    margin: 2rem 0 1.5rem;
}

h2 {
    border-left: 1rem solid gold;
    padding-left: 0.75rem;
    font-family: 'Arial', sans-serif;
    font-size: 2rem;
    margin: 1.5rem 0 1rem 0;
    color: #335;
}

h3 {
    border-left: 0.5rem solid gold;
    padding-left: 0.5rem;
    font-family: 'Arial', sans-serif;
    font-size: 1.75rem;
    margin: 1.25rem 0 0.75rem 1rem;
    color: #557;
}

h4 {
    border-left: 1rem solid gold;
    font-family: 'Arial', sans-serif;
    font-size: 1.5rem;
    margin: 1rem 0 0.5rem 1.5rem;
    color: #779;
    font-weight: bold;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-family: 'Arial', sans-serif;
  background-color: #f9f9f9;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border: 1px solid #ddd;
}

th {
  background-color: gold;
  color: black;
  font-weight: bold;
}

tr:nth-child(even) {
  background-color: #f1f1f1;
}

tr:hover {
  background-color: #f5f5f5;
}

td {
  font-size: 1rem;
}

caption {
  caption-side: bottom;
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  margin-top: 0.5rem;
}
@media print {
  /* Ukryj menu/nawigację/TOC itp. */
  .tree,
  nav,
  .sidebar,
  .menu,
  .toc,
  header,
  footer,
  .no-print {
    display: none !important;
  }

  /* Maksymalna szerokość treści */
  .content {
    margin: 0 !important;
    padding: 0.5rem 0 !important;
  }

  /* Czytelna, „drukowa” paleta */
  body {
    margin: 0;
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt !important; /* tekst główny */
    line-height: 1.4;
  }
  h1, h2, h3, h4 {
    color: #000 !important;
    background: transparent !important;
    border-color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Tabele bez cieni, lepsze do druku */
  table {
    box-shadow: none !important;
    background: #fff !important;
  }
  th {
    background: #eee !important; /* delikatne tło zamiast złota */
    color: #000 !important;
  }
  tr:hover {
    background: transparent !important;
  }

  /* Kod/fragmenty: pełna wysokość, bez paska przewijania i tła */
  pre {
    background: #fff !important;
    height: auto !important;
    overflow: visible !important;
    border: 1px solid #ddd !important;
    padding: 0.5rem !important;
  }

  /* Linki: opcjonalnie pokazuj adresy w nawiasach (możesz usunąć, jeśli nie chcesz) */
  a {
    color: #000 !important;
    text-decoration: none !important;
  }
  a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }

  /* Usuń dekoracje węzłów drzewa (na wypadek pozostawionych pozostałości) */
  .tree ul li,
  .tree ul li::before,
  .tree li::after,
  .tree summary::before {
    border: none !important;
    background: none !important;
    content: none !important;
  }

  /* Ustawienia strony A4 i marginesy do druku */
  @page {
    size: A4;
    margin: 12mm;
  }

    /* Rozmiary nagłówków specjalnie pod druk */
  h1 {
    font-size: 18pt !important;
    margin: 16pt 0 6pt !important;
  }
  h2 {
    font-size: 14pt !important;
    margin: 14pt 0 5pt !important;
  }
  h3 {
    font-size: 13pt !important;
    margin: 12pt 0 4pt !important;
  }
  h4 {
    font-size: 12pt !important;
    margin: 10pt 0 3pt !important;
  }
  h5, h6 {
    font-size: 11pt !important;
    margin: 8pt 0 2pt !important;
  }

}
